diff options
-rw-r--r-- | src/settings.js | 14 | ||||
-rwxr-xr-x | tests/runner.py | 3 | ||||
-rw-r--r-- | tools/shared.py | 9 |
3 files changed, 11 insertions, 15 deletions
diff --git a/src/settings.js b/src/settings.js index 9ed87bd6..6b054443 100644 --- a/src/settings.js +++ b/src/settings.js @@ -335,10 +335,16 @@ var PGO = 0; // Enables profile-guided optimization in the form of runtime check // which functions are actually called. Emits a list during shutdown that you // can pass to DEAD_FUNCTIONS (you can also emit the list manually by // calling PGOMonitor.dump()); -var DEAD_FUNCTIONS = []; // A list of functions that no code will be emitted for, and - // a runtime abort will happen if they are called. If - // such a function is an unresolved reference, that is not - // considered an error. +var DEAD_FUNCTIONS = []; // Functions on this list are not converted to JS, and calls to + // them are turned into abort()s. This is potentially useful for + // (1) reducing code size, if you know some function will never + // be called (see PGO), and also (2) ASM.js requires all declared + // functions to have a corresponding implementation (even if the + // function is never called) and will emit an error during linking if no + // implementation can be found; with this option, asm.js validation will + // succeed for that function and calls to it. + // If a dead function is actually called, you will get a runtime + // error. // TODO: options to lazily load such functions var UNRESOLVED_AS_DEAD = 0; // Handle all unresolved functions as if they were in the // list of dead functions. This is a quick way to turn diff --git a/tests/runner.py b/tests/runner.py index a3c74f03..cc53ae42 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -2479,7 +2479,6 @@ Exception execution path of first function! 1 Settings.EXCEPTION_DEBUG = 1 - self.banned_js_engines = [NODE_JS] # node issue 1669, exception causes stdout not to be flushed Settings.DISABLE_EXCEPTION_CATCHING = 0 if '-O2' in self.emcc_args: self.emcc_args += ['--closure', '1'] # Use closure here for some additional coverage @@ -7220,7 +7219,6 @@ void*:16 def test_mmap(self): if self.emcc_args is None: return self.skip('requires emcc') - self.banned_js_engines = [NODE_JS] # slower, and fail on 64-bit Settings.TOTAL_MEMORY = 128*1024*1024 @@ -7669,7 +7667,6 @@ def process(filename): try: os.environ['EMCC_LEAVE_INPUTS_RAW'] = '1' - #self.banned_js_engines = [NODE_JS] # node issue 1669, exception causes stdout not to be flushed Settings.CHECK_OVERFLOWS = 0 for name in glob.glob(path_from_root('tests', 'cases', '*.ll')): diff --git a/tools/shared.py b/tools/shared.py index c4efc974..55224ebb 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -274,7 +274,6 @@ LLVM_DIS=os.path.expanduser(build_llvm_tool_path('llvm-dis')) LLVM_NM=os.path.expanduser(build_llvm_tool_path('llvm-nm')) LLVM_INTERPRETER=os.path.expanduser(build_llvm_tool_path('lli')) LLVM_COMPILER=os.path.expanduser(build_llvm_tool_path('llc')) -LLVM_EXTRACT=os.path.expanduser(build_llvm_tool_path('llvm-extract')) EMSCRIPTEN = path_from_root('emscripten.py') DEMANGLER = path_from_root('third_party', 'demangler.py') @@ -385,8 +384,7 @@ USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK') if USE_EMSDK: # Disable system C and C++ include directories, and add our own (using -idirafter so they are last, like system dirs, which # allows projects to override them) - # Note that -nostdinc++ is not needed, since -nostdinc implies that! - EMSDK_OPTS = ['-nostdinc', '-Xclang', '-nobuiltininc', '-Xclang', '-nostdsysteminc', + EMSDK_OPTS = ['-nostdinc', '-nostdinc++', '-Xclang', '-nobuiltininc', '-Xclang', '-nostdsysteminc', '-Xclang', '-isystem' + path_from_root('system', 'local', 'include'), '-Xclang', '-isystem' + path_from_root('system', 'include', 'libcxx'), '-Xclang', '-isystem' + path_from_root('system', 'include'), @@ -721,11 +719,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e return generated_libs @staticmethod - def remove_symbol(filename, symbol): - Popen([LLVM_EXTRACT, filename, '-delete', '-glob=' + symbol, '-o', filename], stderr=PIPE).communicate() - Popen([LLVM_EXTRACT, filename, '-delete', '-func=' + symbol, '-o', filename], stderr=PIPE).communicate() - - @staticmethod def link(files, target): actual_files = [] unresolved_symbols = set(['main']) # tracking unresolveds is necessary for .a linking, see below. (and main is always a necessary symbol) |