diff options
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/shared.py b/tools/shared.py index c4b01518..7a49f158 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -270,7 +270,7 @@ if EM_POPEN_WORKAROUND and os.name == 'nt': # Expectations -EXPECTED_LLVM_VERSION = (3,2) +EXPECTED_LLVM_VERSION = (3,3) actual_clang_version = None @@ -303,6 +303,7 @@ def check_fastcomp(): print >> sys.stderr, '===========================================================================' print >> sys.stderr, llc_version_info, print >> sys.stderr, '===========================================================================' + logging.critical('you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see https://github.com/kripken/emscripten/wiki/LLVM-Backend') return False return True except Exception, e: @@ -379,7 +380,7 @@ def check_sanity(force=False): # some warning, mostly not fatal checks - do them even if EM_IGNORE_SANITY is on check_llvm_version() check_node_version() - if os.environ.get('EMCC_FAST_COMPILER') == '1': + if os.environ.get('EMCC_FAST_COMPILER') != '0': fastcomp_ok = check_fastcomp() if os.environ.get('EM_IGNORE_SANITY'): @@ -402,7 +403,7 @@ def check_sanity(force=False): logging.critical('Cannot find %s, check the paths in %s' % (cmd, EM_CONFIG)) sys.exit(1) - if os.environ.get('EMCC_FAST_COMPILER') == '1': + if os.environ.get('EMCC_FAST_COMPILER') != '0': if not fastcomp_ok: logging.critical('failing sanity checks due to previous fastcomp failure') sys.exit(1) @@ -803,6 +804,8 @@ class Settings2(type): @classmethod def apply_opt_level(self, opt_level, noisy=False): + if opt_level == 0 and os.environ.get('EMCC_FAST_COMPILER') == '0': + self.attrs['ASM_JS'] = 0 # non-fastcomp has asm off in -O1 if opt_level >= 1: self.attrs['ASM_JS'] = 1 self.attrs['ASSERTIONS'] = 0 @@ -1467,7 +1470,7 @@ class Building: @staticmethod def ensure_relooper(relooper): if os.path.exists(relooper): return - if os.environ.get('EMCC_FAST_COMPILER') == '1': + if os.environ.get('EMCC_FAST_COMPILER') != '0': logging.debug('not building relooper to js, using it in c++ backend') return @@ -1542,7 +1545,7 @@ class Building: text = m.groups(0)[0] assert text.count('(') == 1 and text.count(')') == 1, 'must have simple expressions in emscripten_jcache_printf calls, no parens' assert text.count('"') == 2, 'must have simple expressions in emscripten_jcache_printf calls, no strings as varargs parameters' - if os.environ.get('EMCC_FAST_COMPILER') == '1': # fake it in fastcomp + if os.environ.get('EMCC_FAST_COMPILER') != '0': # fake it in fastcomp return text.replace('emscripten_jcache_printf', 'printf') start = text.index('(') end = text.rindex(')') |