aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-21 11:57:30 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-21 11:57:30 -0800
commit91745dd0c857bfe52100ea2876325af85fb7b016 (patch)
tree1fbe97776d9b06b7d1b3817b7dda1f8370db5065
parentd484101045f135b226bc3c1d3b4948baa356b124 (diff)
add message pointing people to the fastcomp wiki page that explains how to disable it, when a compiler setting is not fastcomp-compatible
-rwxr-xr-xemcc33
-rw-r--r--tests/test_sanity.py4
2 files changed, 23 insertions, 14 deletions
diff --git a/emcc b/emcc
index 7743c9a8..36532d16 100755
--- a/emcc
+++ b/emcc
@@ -1204,20 +1204,25 @@ try:
if fastcomp:
shared.Settings.ASM_JS = 1 if opt_level > 0 else 2
- assert shared.Settings.UNALIGNED_MEMORY == 0, 'forced unaligned memory not supported in fastcomp'
- assert shared.Settings.CHECK_HEAP_ALIGN == 0, 'check heap align not supported in fastcomp yet'
- assert shared.Settings.SAFE_DYNCALLS == 0, 'safe dyncalls not supported in fastcomp'
- assert shared.Settings.ASM_HEAP_LOG == 0, 'asm heap log not supported in fastcomp'
- assert shared.Settings.LABEL_DEBUG == 0, 'label debug not supported in fastcomp'
- assert shared.Settings.EXECUTION_TIMEOUT == -1, 'execution timeout not supported in fastcomp'
- assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp'
- assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp'
- assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32'
- assert shared.Settings.USE_TYPED_ARRAYS == 2, 'fastcomp assumes ta2'
- assert not split_js_file, '--split-js is deprecated and not supported in fastcomp'
- assert not bind, 'embind not supported in fastcomp yet'
- assert shared.Settings.MAX_SETJMPS == 20, 'changing MAX_SETJMPS is not supported in fastcomp yet'
- assert shared.Settings.INIT_HEAP == 0, 'HEAP_INIT is not supported in fastcomp (and should never be needed except for debugging)'
+ try:
+ assert shared.Settings.UNALIGNED_MEMORY == 0, 'forced unaligned memory not supported in fastcomp'
+ assert shared.Settings.CHECK_HEAP_ALIGN == 0, 'check heap align not supported in fastcomp yet'
+ assert shared.Settings.SAFE_DYNCALLS == 0, 'safe dyncalls not supported in fastcomp'
+ assert shared.Settings.ASM_HEAP_LOG == 0, 'asm heap log not supported in fastcomp'
+ assert shared.Settings.LABEL_DEBUG == 0, 'label debug not supported in fastcomp'
+ assert shared.Settings.EXECUTION_TIMEOUT == -1, 'execution timeout not supported in fastcomp'
+ assert shared.Settings.NAMED_GLOBALS == 0, 'named globals not supported in fastcomp'
+ assert shared.Settings.PGO == 0, 'pgo not supported in fastcomp'
+ assert shared.Settings.TARGET_LE32 == 1, 'fastcomp requires le32'
+ assert shared.Settings.USE_TYPED_ARRAYS == 2, 'fastcomp assumes ta2'
+ assert not split_js_file, '--split-js is deprecated and not supported in fastcomp'
+ assert not bind, 'embind not supported in fastcomp yet'
+ assert shared.Settings.MAX_SETJMPS == 20, 'changing MAX_SETJMPS is not supported in fastcomp yet'
+ assert shared.Settings.INIT_HEAP == 0, 'HEAP_INIT is not supported in fastcomp (and should never be needed except for debugging)'
+ except Exception, e:
+ logging.error('Compiler settings are incompatible with fastcomp. You can fall back to the older compiler core, although that is not recommended, see https://github.com/kripken/emscripten/wiki/LLVM-Backend')
+ raise e
+
if jcache:
logging.warning('jcache is not supported in fastcomp (you should not need it anyhow), disabling')
jcache = False
diff --git a/tests/test_sanity.py b/tests/test_sanity.py
index 4e01add8..34f98fde 100644
--- a/tests/test_sanity.py
+++ b/tests/test_sanity.py
@@ -223,6 +223,10 @@ class sanity(RunnerCore):
os.chmod(path_from_root('tests', 'fake', 'llc'), stat.S_IREAD | stat.S_IWRITE | stat.S_IEXEC)
output = self.check_working(EMCC, WARNING)
+ restore()
+
+ self.check_working([EMCC, 'tests/hello_world.cpp', '-s', 'INIT_HEAP=1'], '''Compiler settings are incompatible with fastcomp. You can fall back to the older compiler core, although that is not recommended, see https://github.com/kripken/emscripten/wiki/LLVM-Backend''')
+
def test_node(self):
NODE_WARNING = 'node version appears too old'
NODE_WARNING_2 = 'cannot check node version'