Backed out changeset 579d66b2e57d (bug 1523003) for build bustages at test_toolchain_configure.py.
authorBrindusan Cristian <cbrindusan@mozilla.com>
Sun, 27 Jan 2019 16:45:06 +0200
changeset 515588 47aa4d0b53749a04760a41213d88c2cfed80a870
parent 515587 579d66b2e57dcaf66fab49df4be13ceb84ca150b
child 515589 80254b1b3aa1e1a5dece34a9c966ed8ebdb13e8f
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1523003
milestone66.0a1
backs out579d66b2e57dcaf66fab49df4be13ceb84ca150b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 579d66b2e57d (bug 1523003) for build bustages at test_toolchain_configure.py.
build/moz.configure/toolchain.configure
python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -614,16 +614,23 @@ def check_compiler(compiler, language, t
     if info.language == 'C++':
         if info.type == 'clang' and info.language_version != cxx14_version:
             append_flag('-std=gnu++14')
         # MSVC headers include C++14 features, but don't guard them
         # with appropriate checks.
         elif info.type == 'clang-cl' and info.language_version != cxx14_version:
             append_flag('-std=c++14')
 
+    # We force clang-cl to emulate Visual C++ 2017 version 15.8.4
+    msvc_version = '19.15.26726'
+    if info.type == 'clang-cl' and info.version != msvc_version:
+        # This flag is a direct clang-cl flag that doesn't need -Xclang,
+        # add it directly.
+        flags.append('-fms-compatibility-version=%s' % msvc_version)
+
     # Check compiler target
     # --------------------------------------------------------------------
     if not info.cpu or info.cpu != target.cpu:
         if info.type == 'clang':
             append_flag('--target=%s' % target.toolchain)
         elif info.type == 'clang-cl':
             # Ideally this would share the 'clang' branch above, but on Windows
             # the --target needs additional data like ms-compatibility-version.
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
@@ -258,16 +258,17 @@ VS_PLATFORM_X86_64 = {
 # Note: In reality, the -std=gnu* options are only supported when preceded by
 # -Xclang.
 CLANG_CL_3_9 = (CLANG_BASE('3.9.0') + VS('18.00.00000') + DEFAULT_C11 +
                 SUPPORTS_GNU99 + SUPPORTS_GNUXX11 + SUPPORTS_CXX14) + {
     '*.cpp': {
         '__STDC_VERSION__': False,
         '__cplusplus': '201103L',
     },
+    '-fms-compatibility-version=19.15.26726': VS('19.15.26726')[None],
 }
 
 CLANG_CL_PLATFORM_X86 = FakeCompiler(VS_PLATFORM_X86, GCC_PLATFORM_X86[None])
 CLANG_CL_PLATFORM_X86_64 = FakeCompiler(VS_PLATFORM_X86_64, GCC_PLATFORM_X86_64[None])
 
 LIBRARY_NAME_INFOS = {
     'linux-gnu': {
         'DLL_PREFIX': 'lib',
@@ -922,25 +923,27 @@ class WindowsToolchainTest(BaseToolchain
     VSXX_2017u8_RESULT = CompilerResult(
         flags=[],
         version='19.15.26726',
         type='msvc',
         compiler='/usr/bin/cl',
         language='C++',
     )
     CLANG_CL_3_9_RESULT = CompilerResult(
-        flags=['-Xclang', '-std=gnu99'],
-        version='3.9.0',
+        flags=['-Xclang', '-std=gnu99',
+               '-fms-compatibility-version=19.15.26726'],
+        version='19.15.26726',
         type='clang-cl',
         compiler='/usr/bin/clang-cl',
         language='C',
     )
     CLANGXX_CL_3_9_RESULT = CompilerResult(
-        flags=['-Xclang', '-std=c++14'],
-        version='3.9.0',
+        flags=['-Xclang', '-std=c++14',
+               '-fms-compatibility-version=19.15.26726'],
+        version='19.15.26726',
         type='clang-cl',
         compiler='/usr/bin/clang-cl',
         language='C++',
     )
     CLANG_3_3_RESULT = LinuxToolchainTest.CLANG_3_3_RESULT
     CLANGXX_3_3_RESULT = LinuxToolchainTest.CLANGXX_3_3_RESULT
     DEFAULT_CLANG_RESULT = LinuxToolchainTest.DEFAULT_CLANG_RESULT
     DEFAULT_CLANGXX_RESULT = LinuxToolchainTest.DEFAULT_CLANGXX_RESULT