Index: compile |
=================================================================== |
--- a/compile |
+++ b/compile |
@@ -36,17 +36,17 @@ GENERATION_PARAMS = { |
'NO_EXIT_RUNTIME': 1, |
'NO_DYNAMIC_EXECUTION': 1, |
'NO_FILESYSTEM': 1, |
'INVOKE_RUN': 0, |
'TEXTDECODER': 0, |
'EXPORTED_RUNTIME_METHODS': ['cwrap', 'ccall', 'stringToAscii'], |
} |
DEFINES = [] |
-ADDITIONAL_PARAMS = ['-O3', '-m32', '-std=gnu++14', '--memory-init-file', '0', |
+ADDITIONAL_PARAMS = ['-O3', '-m32', '-std=c++1z', '--memory-init-file', '0', |
'--emit-symbol-map', '-Wall', '-Werror', '-fno-exceptions', |
'-fno-rtti', '--js-library', JS_LIBRARY] |
def get_source_files(phase): |
for (path, dirs, files) in os.walk(SOURCE_DIR): |
for f in files: |
if os.path.splitext(f)[1] != '.cpp': |
@@ -70,17 +70,18 @@ def getenv(emscripten_config): |
'NODE_JS': scope.get('NODE_JS', 'node'), |
}) |
return env |
def generate_bindings(env): |
params = [ |
env['PYTHON'], os.path.join(env['EMSCRIPTEN'], 'emcc'), |
- '-o', BINDINGS_GENERATOR, '-std=gnu++14', '--js-library', JS_LIBRARY, |
+ '-o', BINDINGS_GENERATOR, '-std=c++1z', '--js-library', JS_LIBRARY, |
+ '--js-library', os.path.join(SOURCE_DIR, 'bindings', 'library.js'), |
] + list(get_source_files('bindings')) |
subprocess.check_call(params, env=env) |
with open(BINDINGS_OUTPUT, 'w') as file: |
subprocess.check_call([env['NODE_JS'], BINDINGS_GENERATOR], |
stdout=file) |