diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-04 21:12:18 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-04 21:12:18 -0700 |
commit | d79e23b630c76f628b9f183106912d1f47b14d22 (patch) | |
tree | 546a3cb2bd91c80a9f13ababf720f4de0fbcc153 /tools/shared.py | |
parent | ef96768ac8a4ef3af360e0d0ad32706e21eb4d11 (diff) | |
parent | 1e30c181f04612e8be2dbcea8ae67f4698c1b0bc (diff) |
Merge branch 'ag/clang-add-version' of github.com:agladysh/emscripten into agladysh-ag/clang-add-version2
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/shared.py b/tools/shared.py index 61779c59..a13c20a6 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -257,6 +257,7 @@ def check_sanity(force=False): # Tools/paths LLVM_ADD_VERSION = os.getenv('LLVM_ADD_VERSION') +CLANG_ADD_VERSION = os.getenv('CLANG_ADD_VERSION') # Some distributions ship with multiple llvm versions so they add # the version to the binaries, cope with that @@ -266,8 +267,16 @@ def build_llvm_tool_path(tool): else: return os.path.join(LLVM_ROOT, tool) -CLANG_CC=os.path.expanduser(os.path.join(LLVM_ROOT, 'clang')) -CLANG_CPP=os.path.expanduser(os.path.join(LLVM_ROOT, 'clang++')) +# Some distributions ship with multiple clang versions so they add +# the version to the binaries, cope with that +def build_clang_tool_path(tool): + if CLANG_ADD_VERSION: + return os.path.join(LLVM_ROOT, tool + "-" + CLANG_ADD_VERSION) + else: + return os.path.join(LLVM_ROOT, tool) + +CLANG_CC=os.path.expanduser(build_clang_tool_path('clang')) +CLANG_CPP=os.path.expanduser(build_clang_tool_path('clang++')) CLANG=CLANG_CPP LLVM_LINK=build_llvm_tool_path('llvm-link') LLVM_AR=build_llvm_tool_path('llvm-ar') |