Bug 1523003 - Remove the force-ms-compatibility for clang-cl r=glandium a=lizzard
authorTom Ritter <tom@mozilla.com>
Sun, 27 Jan 2019 17:19:57 -0600
changeset 515845 fe8f0e01fc952e240a0ea4eb2799d2181abf2514
parent 515844 9794d3a71c2f19c5d3e723744877edc6a67802a4
child 515846 0456b8fcad6f14cc862d3428b3f42644c40a850b
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, lizzard
bugs1523003
milestone66.0
Bug 1523003 - Remove the force-ms-compatibility for clang-cl r=glandium a=lizzard
build/moz.configure/bindgen.configure
build/moz.configure/toolchain.configure
python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
--- a/build/moz.configure/bindgen.configure
+++ b/build/moz.configure/bindgen.configure
@@ -320,18 +320,16 @@ def basic_bindgen_cflags(host, target, i
         'WINNT': {
             'default': [
                 '-DOS_WIN=1',
                 '-DWIN32=1',
             ],
             'compiler': {
                 'msvc': {
                     'default': [
-                        # For compatibility with MSVC 2015
-                        '-fms-compatibility-version=19',
                         # To enable the builtin __builtin_offsetof so that CRT wouldn't
                         # use reinterpret_cast in offsetof() which is not allowed inside
                         # static_assert().
                         '-D_CRT_USE_BUILTIN_OFFSETOF',
                         # Enable hidden attribute (which is not supported by MSVC and
                         # thus not enabled by default with a MSVC-compatibile build)
                         # to exclude hidden symbols from the generated file.
                         '-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1',
--- 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',
+        version='18.00.00000',
+        flags=['-Xclang', '-std=gnu99'],
         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',
+        version='18.00.00000',
+        flags=['-Xclang', '-std=c++14'],
         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