diff options
Diffstat (limited to 'src/settings.js')
-rw-r--r-- | src/settings.js | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/src/settings.js b/src/settings.js index 720fb53f..7f9fbabf 100644 --- a/src/settings.js +++ b/src/settings.js @@ -23,8 +23,8 @@ var QUANTUM_SIZE = 4; // This is the size of an individual field in a structure. // Changing this from the default of 4 is deprecated. var TARGET_X86 = 0; // For i386-pc-linux-gnu -var TARGET_LE32 = 1; // For le32-unknown-nacl. 1 is normal, 2 is for the fastcomp llvm - // backend using pnacl abi simplification +var TARGET_ASMJS_UNKNOWN_EMSCRIPTEN = 1; // For asmjs-unknown-emscripten. 1 is normal, 2 is for the fastcomp llvm + // backend using emscripten-customized abi simplification var CORRECT_SIGNS = 1; // Whether we make sure to convert unsigned values to signed values. // Decreases performance with additional runtime checks. Might not be @@ -48,6 +48,8 @@ var VERBOSE = 0; // When set to 1, will generate more verbose output during comp var INVOKE_RUN = 1; // Whether we will run the main() function. Disable if you embed the generated // code in your own, and will call main() yourself at the right time (which you // can do with Module.callMain(), with an optional parameter of commandline args). +var NO_EXIT_RUNTIME = 0; // If set, the runtime is not quit when main() completes (allowing code to + // run afterwards, for example from the browser main event loop). var INIT_HEAP = 0; // Whether to initialize memory anywhere other than the stack to 0. var TOTAL_STACK = 5*1024*1024; // The total stack size. There is no way to enlarge the stack, so this // value must be large enough for the program's requirements. If @@ -104,6 +106,9 @@ var FORCE_ALIGNED_MEMORY = 0; // If enabled, assumes all reads and writes are fu // for ways to help find places in your code where unaligned reads/writes are done - // you might be able to refactor your codebase to prevent them, which leads to // smaller and faster code, or even the option to turn this flag on. +var WARN_UNALIGNED = 0; // Warn at compile time about instructions that LLVM tells us are not fully aligned. + // This is useful to find places in your code where you might refactor to ensure proper + // alignment. (this option is fastcomp-only) var PRECISE_I64_MATH = 1; // If enabled, i64 addition etc. is emulated - which is slow but precise. If disabled, // we use the 'double trick' which is fast but incurs rounding at high values. // Note that we do not catch 32-bit multiplication by default (which must be done in @@ -121,8 +126,11 @@ var PRECISE_F32 = 0; // 0: Use JS numbers for floating-point values. These are 6 // 1: Model C++ floats precisely, using Math.fround, polyfilling when necessary. This // can be slow if the polyfill is used on heavy float32 computation. // 2: Model C++ floats precisely using Math.fround if available in the JS engine, otherwise - // use an empty polyfill. This will have less of a speed penalty than using the full - // polyfill in cases where engine support is not present. + // use an empty polyfill. This will have much less of a speed penalty than using the full + // polyfill in cases where engine support is not present. In addition, we can + // remove the empty polyfill calls themselves on the client when generating html, + // which should mean that this gives you the best of both worlds of 0 and 1, and is + // therefore recommended. var SIMD = 0; // Whether to emit SIMD code ( https://github.com/johnmccutchan/ecmascript_simd ) var CLOSURE_ANNOTATIONS = 0; // If set, the generated code will be annotated for the closure @@ -251,8 +259,8 @@ var DISABLE_EXCEPTION_CATCHING = 0; // Disables generating code to actually catc // TODO: Make this also remove cxa_begin_catch etc., optimize relooper // for it, etc. (perhaps do all of this as preprocessing on .ll?) -var EXCEPTION_CATCHING_WHITELIST = []; // Enables catching exception in listed functions if - // DISABLE_EXCEPTION_CATCHING = 2 set +var EXCEPTION_CATCHING_WHITELIST = []; // Enables catching exception in the listed functions only, if + // DISABLE_EXCEPTION_CATCHING = 2 is set var EXECUTION_TIMEOUT = -1; // Throw an exception after X seconds - useful to debug infinite loops var CHECK_OVERFLOWS = 0; // Add code that checks for overflows in integer math operations. @@ -307,6 +315,17 @@ var EXPORT_ALL = 0; // If true, we export all the symbols. Note that this does * // still eliminate functions as dead. This just exports them on the Module object. var EXPORT_BINDINGS = 0; // Export all bindings generator functions (prefixed with emscripten_bind_). This // is necessary to use the bindings generator with asm.js +var RETAIN_COMPILER_SETTINGS = 0; // Remembers the values of these settings, and makes them accessible + // through Runtime.getCompilerSetting and emscripten_get_compiler_setting. + // To see what is retained, look for compilerSettings in the generated code. + + +var EMSCRIPTEN_VERSION = ''; // this will contain the emscripten version. you should not modify it. This + // and the following few settings are useful in combination with + // RETAIN_COMPILER_SETTINGS +var OPT_LEVEL = 0; // this will contain the optimization level (-Ox). you should not modify it. +var DEBUG_LEVEL = 0; // this will contain the debug level (-gx). you should not modify it. + // JS library functions (C functions implemented in JS) // that we include by default. If you want to make sure @@ -427,7 +446,7 @@ var HEADLESS = 0; // If 1, will include shim code that tries to 'fake' a browser var BENCHMARK = 0; // If 1, will just time how long main() takes to execute, and not // print out anything at all whatsoever. This is useful for benchmarking. -var ASM_JS = 0; // If 1, generate code in asm.js format. If 2, emits the same code except +var ASM_JS = 1; // If 1, generate code in asm.js format. If 2, emits the same code except // for omitting 'use asm' var PGO = 0; // Enables profile-guided optimization in the form of runtime checks for |