aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/settings.js b/src/settings.js
index c878be92..d3abb06e 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -17,6 +17,9 @@ 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
+
var CORRECT_SIGNS = 1; // Whether we make sure to convert unsigned values to signed values.
// Decreases performance with additional runtime checks. Might not be
// needed in some kinds of code.
@@ -86,6 +89,12 @@ var UNALIGNED_MEMORY = 0; // If enabled, all memory accesses are assumed to be u
// typed arrays mode 2 where alignment is relevant.) In unaligned memory mode, you
// can run nonportable code that typically would break in JS (or on ARM for that
// matter, which also cannot do unaligned reads/writes), at the cost of slowness
+var FORCE_ALIGNED_MEMORY = 0; // If enabled, assumes all reads and writes are fully aligned for the type they
+ // use. This is true in proper C code (no undefined behavior), but is sadly
+ // common enough that we can't do it by default. See SAFE_HEAP and CHECK_HEAP_ALIGN
+ // 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 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
@@ -133,6 +142,10 @@ var SAFE_DYNCALLS = 0; // Show stack traces on missing function pointer/virtual
var RESERVED_FUNCTION_POINTERS = 0; // In asm.js mode, we cannot simply add function pointers to
// function tables, so we reserve some slots for them.
+var ALIASING_FUNCTION_POINTERS = 0; // Whether to allow function pointers to alias if they have
+ // a different type. This can greatly decrease table sizes
+ // in asm.js, but can break code that compares function
+ // pointers across different types.
var ASM_HEAP_LOG = 0; // Simple heap logging, like SAFE_HEAP_LOG but cheaper, and in asm.js
@@ -276,7 +289,8 @@ var PRINT_SPLIT_FILE_MARKER = 0; // Prints markers in Javascript generation to s
var BUILD_AS_SHARED_LIB = 0; // Whether to build the code as a shared library
// 0 here means this is not a shared lib: It is a main file.
- // 1 means this is a normal shared lib, load it with dlopen().
+ // All shared library options (1 and 2) are currently deprecated XXX
+ // 1 means this is a normal shared lib, load it with dlopen()
// 2 means this is a shared lib that will be linked at runtime,
// which means it will insert its functions into
// the global namespace. See STATIC_LIBS_TO_LOAD.
@@ -317,6 +331,9 @@ var WARN_ON_UNDEFINED_SYMBOLS = 0; // If set to 1, we will warn on any undefined
// the existing buildsystem), and (2) functions might be
// implemented later on, say in --pre-js
+var ERROR_ON_UNDEFINED_SYMBOLS = 0; // If set to 1, we will give a compile-time error on any
+ // undefined symbols (see WARN_ON_UNDEFINED_SYMBOLS).
+
var SMALL_XHR_CHUNKS = 0; // Use small chunk size for binary synchronous XHR's in Web Workers.
// Used for testing.
// See test_chunked_synchronous_xhr in runner.py and library.js.