summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/clang/scripts/update.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 0e2028e..7b6ebcf 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -437,7 +437,9 @@ def UpdateClang(args):
[cxx, '-print-file-name=libstdc++.so.6']).rstrip()
os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp)
- cflags = cxxflags = ldflags = []
+ cflags = []
+ cxxflags = []
+ ldflags = []
base_cmake_args = ['-GNinja',
'-DCMAKE_BUILD_TYPE=Release',
@@ -476,6 +478,10 @@ def UpdateClang(args):
# https://stackoverflow.com/questions/13050827
cc = cc.replace('\\', '/')
cxx = cxx.replace('\\', '/')
+ # If we're using VS 2015, tell the stage 1 compiler to act like it.
+ if GetVSVersion().ShortName().startswith('2015'):
+ cflags += ['-fms-compatibility-version=19']
+ cxxflags += ['-fms-compatibility-version=19']
else:
cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang')
cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++')