Changeset 40792b2 for wscript


Ignore:
Timestamp:
May 30, 2017, 12:30:33 AM (3 years ago)
Author:
Martin Hermant <martin.hermant@gmail.com>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master
Children:
09894ba3
Parents:
541ea280
Message:

wscript : use gen_external code to generate flags passed to emscripten

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r541ea280 r40792b2  
    239239            ctx.env.cshlib_PATTERN = '%s.min.js'
    240240       
     241         # import exposed function names
     242        from python.lib.gen_external import get_c_declarations,get_cpp_objects_from_c_declarations,get_all_func_names_from_lib,generate_lib_from_c_declarations
     243        c_decls = get_c_declarations(usedouble=False) #emscripten can't use double
     244        objects = get_cpp_objects_from_c_declarations(c_decls)
     245        objects+=['fvec']
     246        lib =  generate_lib_from_c_declarations(objects,c_decls)
     247        exported_funcnames = get_all_func_names_from_lib(lib)
     248        c_mangled_names = ['_'+s for s in exported_funcnames]
     249        ctx.env.LINKFLAGS_cshlib += ['-s','EXPORTED_FUNCTIONS=%s'%c_mangled_names]
    241250        ctx.env.cprogram_PATTERN = "%s.js"
    242251        if (ctx.options.enable_atlas != True):
Note: See TracChangeset for help on using the changeset viewer.