diff options
-rw-r--r-- | AUTHORS | 3 | ||||
-rw-r--r-- | tools/shared.py | 13 |
2 files changed, 14 insertions, 2 deletions
@@ -57,3 +57,6 @@ a license to everyone to use it as detailed in LICENSE.) * Ting-Yuan Huang <thuang@mozilla.com> * Felix H. Dahlke <fhd@ubercode.de> * Éloi Rivard <azmeuk@gmail.com> +* Alexander Gladysh <ag@logiceditor.com> + + 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') |