From 40792b2ef7f967e07626b22f6f120397a5f76317 Mon Sep 17 00:00:00 2001 From: Martin Hermant Date: Mon, 29 May 2017 18:30:33 -0400 Subject: [PATCH] wscript : use gen_external code to generate flags passed to emscripten --- wscript | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wscript b/wscript index 05b3b0ac..2952cbf2 100644 --- a/wscript +++ b/wscript @@ -238,6 +238,15 @@ def configure(ctx): ctx.env.LINKFLAGS += ['-Oz'] ctx.env.cshlib_PATTERN = '%s.min.js' + # import exposed function names + 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 + c_decls = get_c_declarations(usedouble=False) #emscripten can't use double + objects = get_cpp_objects_from_c_declarations(c_decls) + objects+=['fvec'] + lib = generate_lib_from_c_declarations(objects,c_decls) + exported_funcnames = get_all_func_names_from_lib(lib) + c_mangled_names = ['_'+s for s in exported_funcnames] + ctx.env.LINKFLAGS_cshlib += ['-s','EXPORTED_FUNCTIONS=%s'%c_mangled_names] ctx.env.cprogram_PATTERN = "%s.js" if (ctx.options.enable_atlas != True): ctx.options.enable_atlas = False -- 2.11.0