Bug 1523003 - Remove the force-ms-compatibility for clang-cl. r=glandium
☠☠ backed out by 47aa4d0b5374 ☠ ☠
authorTom Ritter <tom@mozilla.com>
Fri, 25 Jan 2019 18:28:05 -0600
changeset 515587 579d66b2e57dcaf66fab49df4be13ceb84ca150b
parent 515583 2013099b2c13997ffe1362e6e1e9cf09cd4cd4ac
child 515588 47aa4d0b53749a04760a41213d88c2cfed80a870
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)
reviewersglandium
bugs1523003
milestone66.0a1
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
Bug 1523003 - Remove the force-ms-compatibility for clang-cl. r=glandium
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,23 +614,16 @@ 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,17 +258,16 @@ 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',
@@ -923,27 +922,25 @@ 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',
-               '-fms-compatibility-version=19.15.26726'],
-        version='19.15.26726',
+        flags=['-Xclang', '-std=gnu99'],
+        version='3.9.0',
         type='clang-cl',
         compiler='/usr/bin/clang-cl',
         language='C',
     )
     CLANGXX_CL_3_9_RESULT = CompilerResult(
-        flags=['-Xclang', '-std=c++14',
-               '-fms-compatibility-version=19.15.26726'],
-        version='19.15.26726',
+        flags=['-Xclang', '-std=c++14'],
+        version='3.9.0',
         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