зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1536848 - raise the minimum gcc version to 7; r=dmajor
We need this for full C++17 support. Differential Revision: https://phabricator.services.mozilla.com/D51451 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
cea5b52b59
Коммит
72b0fe8ee6
|
@ -1015,9 +1015,9 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
|
|||
if host_or_target.os == 'Android':
|
||||
raise FatalCheckError('GCC is not supported on Android.\n'
|
||||
'Please use clang from the Android NDK instead.')
|
||||
if info.version < '6.1.0':
|
||||
if info.version < '7.1.0':
|
||||
raise FatalCheckError(
|
||||
'Only GCC 6.1 or newer is supported (found version %s).'
|
||||
'Only GCC 7.1 or newer is supported (found version %s).'
|
||||
% info.version)
|
||||
|
||||
if info.type == 'clang-cl':
|
||||
|
|
|
@ -127,9 +127,11 @@ GCC_6 = GCC('6.4.0') + DEFAULT_C11
|
|||
GXX_6 = GXX('6.4.0') + DEFAULT_CXX_14 + SUPPORTS_GNUXX17 + SUPPORTS_DRAFT_CXX17_201500_VERSION
|
||||
GCC_7 = GCC('7.3.0') + DEFAULT_C11
|
||||
GXX_7 = GXX('7.3.0') + DEFAULT_CXX_14 + SUPPORTS_GNUXX17 + SUPPORTS_CXX17
|
||||
GCC_8 = GCC('8.3.0') + DEFAULT_C11
|
||||
GXX_8 = GXX('8.3.0') + DEFAULT_CXX_14 + SUPPORTS_GNUXX17 + SUPPORTS_CXX17
|
||||
|
||||
DEFAULT_GCC = GCC_6
|
||||
DEFAULT_GXX = GXX_6
|
||||
DEFAULT_GCC = GCC_7
|
||||
DEFAULT_GXX = GXX_7
|
||||
|
||||
GCC_PLATFORM_LITTLE_ENDIAN = {
|
||||
'__ORDER_LITTLE_ENDIAN__': 1234,
|
||||
|
@ -462,7 +464,7 @@ class BaseToolchainTest(BaseConfigureTest):
|
|||
|
||||
|
||||
def old_gcc_message(old_ver):
|
||||
return 'Only GCC 6.1 or newer is supported (found version {}).'.format(old_ver)
|
||||
return 'Only GCC 7.1 or newer is supported (found version {}).'.format(old_ver)
|
||||
|
||||
|
||||
class LinuxToolchainTest(BaseToolchainTest):
|
||||
|
@ -477,6 +479,8 @@ class LinuxToolchainTest(BaseToolchainTest):
|
|||
'/usr/bin/g++-6': GXX_6 + GCC_PLATFORM_X86_64_LINUX,
|
||||
'/usr/bin/gcc-7': GCC_7 + GCC_PLATFORM_X86_64_LINUX,
|
||||
'/usr/bin/g++-7': GXX_7 + GCC_PLATFORM_X86_64_LINUX,
|
||||
'/usr/bin/gcc-8': GCC_8 + GCC_PLATFORM_X86_64_LINUX,
|
||||
'/usr/bin/g++-8': GXX_8 + GCC_PLATFORM_X86_64_LINUX,
|
||||
'/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_64_LINUX,
|
||||
'/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_LINUX,
|
||||
'/usr/bin/clang-5.0': CLANG_5_0 + CLANG_PLATFORM_X86_64_LINUX,
|
||||
|
@ -493,20 +497,8 @@ class LinuxToolchainTest(BaseToolchainTest):
|
|||
GXX_4_9_RESULT = GCC_4_9_RESULT
|
||||
GCC_5_RESULT = old_gcc_message('5.2.1')
|
||||
GXX_5_RESULT = GCC_5_RESULT
|
||||
GCC_6_RESULT = CompilerResult(
|
||||
flags=['-std=gnu99'],
|
||||
version='6.4.0',
|
||||
type='gcc',
|
||||
compiler='/usr/bin/gcc-6',
|
||||
language='C',
|
||||
)
|
||||
GXX_6_RESULT = CompilerResult(
|
||||
flags=[],
|
||||
version='6.4.0',
|
||||
type='gcc',
|
||||
compiler='/usr/bin/g++-6',
|
||||
language='C++',
|
||||
)
|
||||
GCC_6_RESULT = old_gcc_message('6.4.0')
|
||||
GXX_6_RESULT = GCC_6_RESULT
|
||||
GCC_7_RESULT = CompilerResult(
|
||||
flags=['-std=gnu99'],
|
||||
version='7.3.0',
|
||||
|
@ -521,8 +513,22 @@ class LinuxToolchainTest(BaseToolchainTest):
|
|||
compiler='/usr/bin/g++-7',
|
||||
language='C++',
|
||||
)
|
||||
DEFAULT_GCC_RESULT = GCC_6_RESULT + {'compiler': '/usr/bin/gcc'}
|
||||
DEFAULT_GXX_RESULT = GXX_6_RESULT + {'compiler': '/usr/bin/g++'}
|
||||
GCC_8_RESULT = CompilerResult(
|
||||
flags=['-std=gnu99'],
|
||||
version='8.3.0',
|
||||
type='gcc',
|
||||
compiler='/usr/bin/gcc-8',
|
||||
language='C',
|
||||
)
|
||||
GXX_8_RESULT = CompilerResult(
|
||||
flags=[],
|
||||
version='8.3.0',
|
||||
type='gcc',
|
||||
compiler='/usr/bin/g++-8',
|
||||
language='C++',
|
||||
)
|
||||
DEFAULT_GCC_RESULT = GCC_7_RESULT + {'compiler': '/usr/bin/gcc'}
|
||||
DEFAULT_GXX_RESULT = GXX_7_RESULT + {'compiler': '/usr/bin/g++'}
|
||||
|
||||
CLANG_3_3_RESULT = 'Only clang/llvm 5.0 or newer is supported.'
|
||||
CLANGXX_3_3_RESULT = 'Only clang/llvm 5.0 or newer is supported.'
|
||||
|
@ -600,12 +606,12 @@ class LinuxToolchainTest(BaseToolchainTest):
|
|||
self.do_toolchain_test(self.PATHS, {
|
||||
'c_compiler': self.DEFAULT_GCC_RESULT,
|
||||
'cxx_compiler': (
|
||||
'The target C compiler is version 6.4.0, while the target '
|
||||
'C++ compiler is version 7.3.0. Need to use the same compiler '
|
||||
'The target C compiler is version 7.3.0, while the target '
|
||||
'C++ compiler is version 8.3.0. Need to use the same compiler '
|
||||
'version.'),
|
||||
}, environ={
|
||||
'CC': 'gcc',
|
||||
'CXX': 'g++-7',
|
||||
'CXX': 'g++-8',
|
||||
})
|
||||
|
||||
self.do_toolchain_test(self.PATHS, {
|
||||
|
@ -613,12 +619,12 @@ class LinuxToolchainTest(BaseToolchainTest):
|
|||
'cxx_compiler': self.DEFAULT_GXX_RESULT,
|
||||
'host_c_compiler': self.DEFAULT_GCC_RESULT,
|
||||
'host_cxx_compiler': (
|
||||
'The host C compiler is version 6.4.0, while the host '
|
||||
'C++ compiler is version 7.3.0. Need to use the same compiler '
|
||||
'The host C compiler is version 7.3.0, while the host '
|
||||
'C++ compiler is version 8.3.0. Need to use the same compiler '
|
||||
'version.'),
|
||||
}, environ={
|
||||
'CC': 'gcc',
|
||||
'HOST_CXX': 'g++-7',
|
||||
'HOST_CXX': 'g++-8',
|
||||
})
|
||||
|
||||
def test_mismatched_compiler(self):
|
||||
|
@ -963,6 +969,8 @@ class WindowsToolchainTest(BaseToolchainTest):
|
|||
'/usr/bin/g++-5': GXX_5 + GCC_PLATFORM_X86_WIN,
|
||||
'/usr/bin/gcc-6': GCC_6 + GCC_PLATFORM_X86_WIN,
|
||||
'/usr/bin/g++-6': GXX_6 + GCC_PLATFORM_X86_WIN,
|
||||
'/usr/bin/gcc-7': GCC_7 + GCC_PLATFORM_X86_WIN,
|
||||
'/usr/bin/g++-7': GXX_7 + GCC_PLATFORM_X86_WIN,
|
||||
'/usr/bin/clang': DEFAULT_CLANG + CLANG_PLATFORM_X86_WIN,
|
||||
'/usr/bin/clang++': DEFAULT_CLANGXX + CLANG_PLATFORM_X86_WIN,
|
||||
'/usr/bin/clang-5.0': CLANG_5_0 + CLANG_PLATFORM_X86_WIN,
|
||||
|
@ -1001,6 +1009,8 @@ class WindowsToolchainTest(BaseToolchainTest):
|
|||
GXX_5_RESULT = LinuxToolchainTest.GXX_5_RESULT
|
||||
GCC_6_RESULT = LinuxToolchainTest.GCC_6_RESULT
|
||||
GXX_6_RESULT = LinuxToolchainTest.GXX_6_RESULT
|
||||
GCC_7_RESULT = LinuxToolchainTest.GCC_7_RESULT
|
||||
GXX_7_RESULT = LinuxToolchainTest.GXX_7_RESULT
|
||||
DEFAULT_GCC_RESULT = LinuxToolchainTest.DEFAULT_GCC_RESULT
|
||||
DEFAULT_GXX_RESULT = LinuxToolchainTest.DEFAULT_GXX_RESULT
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ linux64-base-toolchains/opt:
|
|||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-5.0
|
||||
- linux64-gcc-6
|
||||
- linux64-gcc-7
|
||||
- linux64-rust-1.37
|
||||
- linux64-cbindgen
|
||||
- linux64-sccache
|
||||
|
@ -290,7 +290,7 @@ linux64-base-toolchains/debug:
|
|||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-5.0
|
||||
- linux64-gcc-6
|
||||
- linux64-gcc-7
|
||||
- linux64-rust-1.37
|
||||
- linux64-cbindgen
|
||||
- linux64-sccache
|
||||
|
|
|
@ -40,7 +40,7 @@ linux64-clang-tidy:
|
|||
fetches:
|
||||
toolchain:
|
||||
- linux64-binutils
|
||||
- linux64-gcc-6
|
||||
- linux64-gcc-7
|
||||
|
||||
macosx64-clang-tidy:
|
||||
index:
|
||||
|
@ -65,7 +65,7 @@ macosx64-clang-tidy:
|
|||
- linux64-binutils
|
||||
- linux64-cctools-port
|
||||
- linux64-clang-9
|
||||
- linux64-gcc-6
|
||||
- linux64-gcc-7
|
||||
- linux64-node
|
||||
|
||||
win64-clang-tidy:
|
||||
|
|
|
@ -11,28 +11,13 @@ job-defaults:
|
|||
- 'build/unix/build-gcc/build-gcc.sh'
|
||||
toolchain-artifact: public/build/gcc.tar.xz
|
||||
|
||||
linux64-gcc-6:
|
||||
description: "GCC 6 toolchain build"
|
||||
treeherder:
|
||||
symbol: TL(gcc6)
|
||||
run:
|
||||
script: build-gcc-linux.sh
|
||||
toolchain-alias: linux64-gcc
|
||||
fetches:
|
||||
fetch:
|
||||
- binutils-2.31.1
|
||||
- gcc-6.4.0
|
||||
- gmp-5.1.3
|
||||
- isl-0.15
|
||||
- mpc-0.8.2
|
||||
- mpfr-3.1.5
|
||||
|
||||
linux64-gcc-7:
|
||||
description: "GCC 7 toolchain build"
|
||||
treeherder:
|
||||
symbol: TL(gcc7)
|
||||
run:
|
||||
script: build-gcc-linux.sh
|
||||
toolchain-alias: linux64-gcc
|
||||
fetches:
|
||||
fetch:
|
||||
- binutils-2.31.1
|
||||
|
|
|
@ -25,7 +25,7 @@ linux64-gn:
|
|||
script: build-gn-linux.sh
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-gcc-6
|
||||
- linux64-gcc-7
|
||||
|
||||
macosx64-gn:
|
||||
treeherder:
|
||||
|
|
|
@ -35,7 +35,7 @@ linux64-llvm-dsymutil:
|
|||
fetch:
|
||||
- llvm-for-dsymutil
|
||||
toolchain:
|
||||
- linux64-gcc-6
|
||||
- linux64-gcc-7
|
||||
|
||||
linux64-binutils:
|
||||
description: "Binutils toolchain build"
|
||||
|
@ -116,7 +116,7 @@ linux64-tup:
|
|||
fetch:
|
||||
- tup
|
||||
toolchain:
|
||||
- linux64-gcc-6
|
||||
- linux64-gcc-7
|
||||
|
||||
linux64-upx:
|
||||
description: "UPX build"
|
||||
|
|
Загрузка…
Ссылка в новой задаче