diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-06-06 14:53:43 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-06-06 14:53:43 -0400 |
commit | e0e33aef6d2058fda67e7a0dfd9090a3ddf5c5bc (patch) | |
tree | f206eff9792756bfe72390078afe93ca0b2ec6b8 /buildscripts/clang_format.py | |
parent | a164d4c7ec72d1d1dd0914c7a2dbac9f39413ac7 (diff) | |
download | mongo-e0e33aef6d2058fda67e7a0dfd9090a3ddf5c5bc.tar.gz |
SERVER-24373 Support 64-bit Windows LLVM
Diffstat (limited to 'buildscripts/clang_format.py')
-rwxr-xr-x | buildscripts/clang_format.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/buildscripts/clang_format.py b/buildscripts/clang_format.py index f1e39ec517e..bc38c341048 100755 --- a/buildscripts/clang_format.py +++ b/buildscripts/clang_format.py @@ -218,10 +218,18 @@ class ClangFormat(object): break # If Windows, try to grab it from Program Files + # Check both native Program Files and WOW64 version if sys.platform == "win32": - win32bin = os.path.join(os.environ["ProgramFiles(x86)"], "LLVM\\bin\\clang-format.exe") - if os.path.exists(win32bin): - self.path = win32bin + programfiles = [ + os.environ["ProgramFiles"], + os.environ["ProgramFiles(x86)"], + ] + + for programfile in programfiles: + win32bin = os.path.join(programfile, "LLVM\\bin\\clang-format.exe") + if os.path.exists(win32bin): + self.path = win32bin + break # Have not found it yet, download it from the web if self.path is None: |