diff options
-rw-r--r-- | src/settings.js | 14 | ||||
-rw-r--r-- | tools/shared.py | 6 |
2 files changed, 10 insertions, 10 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/tools/shared.py b/tools/shared.py index d79811bd..6a0ca026 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') @@ -720,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) |