diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-30 12:30:10 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-30 12:30:10 -0700 |
commit | 9cd0580f3ce92daec90a0bf0fbdca5034a7929f3 (patch) | |
tree | a5b82f16eeba7e6984674182cffa6e8d373895e9 /emcc | |
parent | 0cbf3f44082077c2ed2afe7f91db68dc53a4c922 (diff) |
add support for changing the llvm target using EMCC_LLVM_TARGET in the env
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1033,8 +1033,17 @@ try: if minify_whitespace is None: minify_whitespace = opt_level >= 2 and not keep_js_debug - if shared.Settings.TARGET_X86: assert 'i386-pc-linux-gnu' in shared.COMPILER_OPTS - if shared.Settings.TARGET_LE32: assert 'le32-unknown-nacl' in shared.COMPILER_OPTS + 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 |