Add support for reading the location of the native optimizer from EMSCRIPTEN_NATIVE_OPTIMIZER environment variable.
This commit is contained in:
Родитель
775009c3ac
Коммит
2bb3bcfbbf
|
@ -30,6 +30,8 @@ NATIVE_OPTIMIZER = os.environ.get('EMCC_NATIVE_OPTIMIZER') or '1' # use native o
|
|||
def get_native_optimizer():
|
||||
if os.environ.get('EMCC_FAST_COMPILER') == '0': return None # need fastcomp for native optimizer
|
||||
|
||||
if len(os.environ.get('EMSCRIPTEN_NATIVE_OPTIMIZER')) > 0: return os.environ.get('EMSCRIPTEN_NATIVE_OPTIMIZER')
|
||||
|
||||
FAIL_MARKER = shared.Cache.get_path('optimizer.building_failed')
|
||||
if os.path.exists(FAIL_MARKER):
|
||||
shared.logging.debug('seeing that optimizer could not be built (run emcc --clear-cache or erase "optimizer.building_failed" in cache dir to retry)')
|
||||
|
|
Загрузка…
Ссылка в новой задаче