diff options
-rwxr-xr-x | emmake | 2 | ||||
-rwxr-xr-x | emscripten.py | 4 | ||||
-rw-r--r-- | src/library.js | 1 | ||||
-rw-r--r-- | src/settings.js | 4 | ||||
-rw-r--r-- | tools/cache.py | 7 |
5 files changed, 14 insertions, 4 deletions
@@ -6,7 +6,7 @@ the environment variables to use emcc and so forth. Usage: emmake make [FLAGS] -Not that if you ran configure with emconfigure, then +Note that if you ran configure with emconfigure, then the environment variables have already been detected and set. This script is useful if you have no configure step, and your Makefile uses the environment vars diff --git a/emscripten.py b/emscripten.py index ac66ed8d..fc9bf42d 100755 --- a/emscripten.py +++ b/emscripten.py @@ -800,7 +800,7 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, set(settings['DEFAULT_LIBRARY_FUNCS_TO_INCLUDE'] + map(shared.JS.to_nice_ident, metadata['declares'])).difference( map(lambda x: x[1:], metadata['implementedFunctions']) ) - ) + ) + map(lambda x: x[1:], metadata['externs']) # Settings changes assert settings['TARGET_LE32'] == 1 @@ -1002,7 +1002,7 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, pass # If no named globals, only need externals global_vars = [] - global_funcs = ['_' + key for key, value in forwarded_json['Functions']['libraryFunctions'].iteritems() if value != 2] + global_funcs = ['_' + key for key, value in forwarded_json['Functions']['libraryFunctions'].iteritems() if value != 2] + metadata['externs'] def math_fix(g): return g if not g.startswith('Math_') else g.split('_')[1] asm_global_funcs = ''.join([' var ' + g.replace('.', '_') + '=global.' + g + ';\n' for g in maths]) + \ diff --git a/src/library.js b/src/library.js index faca945c..33a4debd 100644 --- a/src/library.js +++ b/src/library.js @@ -23,6 +23,7 @@ LibraryManager.library = { stdout: 'allocate(1, "i32*", ALLOC_STATIC)', stderr: 'allocate(1, "i32*", ALLOC_STATIC)', _impure_ptr: 'allocate(1, "i32*", ALLOC_STATIC)', + __dso_handle: 'allocate(1, "i32*", ALLOC_STATIC)', // ========================================================================== // dirent.h diff --git a/src/settings.js b/src/settings.js index 64884eec..753e2367 100644 --- a/src/settings.js +++ b/src/settings.js @@ -224,6 +224,10 @@ var GL_UNSAFE_OPTS = 1; // Enables some potentially-unsafe optimizations in GL e var FULL_ES2 = 0; // Forces support for all GLES2 features, not just the WebGL-friendly subset. var LEGACY_GL_EMULATION = 0; // Includes code to emulate various desktop GL features. Incomplete but useful // in some cases, see https://github.com/kripken/emscripten/wiki/OpenGL-support +var GL_FFP_ONLY = 0; // If you specified LEGACY_GL_EMULATION = 1 and only use fixed function pipeline in your code, + // you can also set this to 1 to signal the GL emulation layer that it can perform extra + // optimizations by knowing that the user code does not use shaders at all. If + // LEGACY_GL_EMULATION = 0, this setting has no effect. var STB_IMAGE = 0; // Enables building of stb-image, a tiny public-domain library for decoding images, allowing // decoding of images without using the browser's built-in decoders. The benefit is that this diff --git a/tools/cache.py b/tools/cache.py index c316a1fd..ed4fcd24 100644 --- a/tools/cache.py +++ b/tools/cache.py @@ -13,8 +13,13 @@ class Cache: self.debug = debug def ensure(self): - if not os.path.exists(self.dirname): + try: + # Use makedirs here, so creating the path is as atomic as possible os.makedirs(self.dirname) + except os.error, e: + # Ignore error for already existing dirname + if not os.path.exists(self.dirname): + raise e def erase(self): tempfiles.try_delete(self.dirname) |