aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc20
1 files changed, 20 insertions, 0 deletions
diff --git a/emcc b/emcc
index 079f6edc..2a1a811d 100755
--- a/emcc
+++ b/emcc
@@ -441,6 +441,10 @@ Options that are modified or new in %s include:
(also a global property) does not invalidate
everything.
+ Note that you must add -g during the linking
+ stage (bitcode to JS), for jcache to work
+ (otherwise, JS minification can confuse it).
+
--clear-cache Manually clears the cache of compiled
emscripten system libraries (libc++,
libc++abi, libc). This is normally
@@ -557,6 +561,7 @@ if CONFIGURE_CONFIG or CMAKE_CONFIG:
cmd = [compiler] + list(filter_emscripten_options(sys.argv[1:]))
if not use_js: cmd += shared.EMSDK_OPTS + ['-DEMSCRIPTEN']
+ if use_js: cmd += ['-s', 'ERROR_ON_UNDEFINED_SYMBOLS=1'] # configure tests should fail when an undefined symbol exists
if DEBUG: print >> sys.stderr, 'emcc, just configuring: ', ' '.join(cmd)
if debug_configure: open(tempout, 'a').write('emcc, just configuring: ' + ' '.join(cmd) + '\n\n')
@@ -1029,9 +1034,24 @@ try:
print >> sys.stderr, 'emcc: warning: disabling closure because debug info was requested'
closure = False
+ if jcache:
+ assert keep_js_debug, 'must run jcache with -g during link stage' # js minification can confuse jcache
+
if minify_whitespace is None:
minify_whitespace = opt_level >= 2 and not keep_js_debug
+ assert shared.LLVM_TARGET in shared.COMPILER_OPTS
+ if shared.LLVM_TARGET == 'i386-pc-linux-gnu':
+ shared.Settings.TARGET_X86 = 1
+ shared.Settings.TARGET_LE32 = 0
+ assert 'le32-unknown-nacl' not in shared.COMPILER_OPTS
+ elif shared.LLVM_TARGET == 'le32-unknown-nacl':
+ shared.Settings.TARGET_LE32 = 1
+ shared.Settings.TARGET_X86 = 0
+ assert 'i386-pc-linux-gnu' not in shared.COMPILER_OPTS
+ else:
+ raise Exception('unknown llvm target: ' + str(shared.LLVM_TARGET))
+
## Compile source code to bitcode
if DEBUG: print >> sys.stderr, 'emcc: compiling to bitcode'