reflect that asm is on by default in fastcomp, even in -O0, in the settings

This commit is contained in:
Alon Zakai 2014-02-21 14:21:12 -08:00
Родитель d2ae502d4c
Коммит 989d49f884
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -446,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

Просмотреть файл

@ -804,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