Bug 1265627 - Force clang-cl MSVC emulation from moz.configure. r=ted

This commit is contained in:
Mike Hommey 2016-04-19 15:55:36 +09:00
parent b80757a0cb
commit 4cad8671dc
2 changed files with 9 additions and 8 deletions

View File

@ -33,13 +33,6 @@ if test "$CC_TYPE" = "clang"; then
fi
if test "$CC_TYPE" = "clang-cl"; then
CLANG_CL=1
# We force clang-cl to emulate Visual C++ 2013 in configure.in, but that
# is based on the CLANG_CL variable defined here, so make sure that we're
# getting the right version here manually.
CC_VERSION=180030723
# Build on clang-cl with MSVC 2013 Update 3 with fallback emulation.
CFLAGS="$CFLAGS -fms-compatibility-version=18.00.30723 -fallback"
CXXFLAGS="$CXXFLAGS -fms-compatibility-version=18.00.30723 -fallback"
fi
if test "$GNU_CC"; then

View File

@ -220,7 +220,7 @@ def get_compiler_info(compiler, language):
#if defined(_MSC_VER)
#if defined(__clang__)
%COMPILER clang-cl
%VERSION _MSC_VER
%VERSION _MSC_FULL_VER
#else
%COMPILER msvc
%VERSION _MSC_FULL_VER
@ -307,6 +307,14 @@ def check_compiler(compiler, language):
if info.type in ('clang-cl', 'clang', 'gcc'):
append_flag('-std=gnu++11')
# We force clang-cl to emulate Visual C++ 2013 Update 3 with fallback to
# cl.exe.
if info.type == 'clang-cl' and info.version != '180030723':
# Those flags are direct clang-cl flags that don't need -Xclang, add
# them directly.
flags.append('-fms-compatibility-version=18.00.30723')
flags.append('-fallback')
return info.type, info.version, flags