Bug 1752059 - Stop using MZLA_RNP_CC/CXX. r=kaie
The effect is that C++ code will use -std-c++17. Depends on D136984 Differential Revision: https://phabricator.services.mozilla.com/D136985
This commit is contained in:
Родитель
516fe663d6
Коммит
e2f3bbe039
|
@ -44,7 +44,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
|
|||
botan_build = GENERATED_FILES['build/build.h']
|
||||
botan_build.script = 'botan_configure.py'
|
||||
botan_build.flags = [
|
||||
'--cc-bin={}'.format(CONFIG['MZLA_RNP_CXX']),
|
||||
'--cc-bin={}'.format(CONFIG['CXX']),
|
||||
'--cpu={}'.format(CONFIG['target_cpu']),
|
||||
'--os={}'.format(botan_os),
|
||||
'--with-build-dir={}'.format(OBJDIR),
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# This file is included my mozbuild for this directory and any subdirectories
|
||||
# that use mozbuild. Currently the OTR libraries do not use mozbuild and
|
||||
# are not affected.
|
||||
|
||||
# MZLA_RNP_CC and MZLA_RNP_CXX are set in openpgp.configure and are used
|
||||
# to remove the -std= flags from the commands.
|
||||
CC := $(MZLA_RNP_CC)
|
||||
CXX := $(MZLA_RNP_CXX)
|
|
@ -291,27 +291,3 @@ def clang_rt_builtins(compiler_info, target):
|
|||
|
||||
set_config("COMPILER_RT_BUILTIN_PATH", clang_rt_builtins.clang_rt_path, when=is_windows)
|
||||
set_config("COMPILER_RT_BUILTIN_LIB", clang_rt_builtins.clang_rt_lib, when=is_windows)
|
||||
|
||||
|
||||
@depends(c_compiler, cxx_compiler, when=compile_environment)
|
||||
def rnp_compiler(c_compiler, cxx_compiler):
|
||||
# Replace -std=gnu++17 or -std=c++17 with -std=gnu++11 or -std=c++11
|
||||
_cxxflags = []
|
||||
for f in cxx_compiler.flags:
|
||||
if f == "-std=c++17":
|
||||
_cxxflags.append("-std=c++14")
|
||||
elif f == "-std=gnu++17":
|
||||
_cxxflags.append("-std=gnu++11")
|
||||
else:
|
||||
_cxxflags.append(f)
|
||||
|
||||
rnp_cc = " ".join(
|
||||
list(c_compiler.wrapper) + [c_compiler.compiler] + c_compiler.flags
|
||||
)
|
||||
rnp_cxx = " ".join(list(cxx_compiler.wrapper) + [cxx_compiler.compiler] + _cxxflags)
|
||||
|
||||
return namespace(rnp_cc=rnp_cc, rnp_cxx=rnp_cxx)
|
||||
|
||||
|
||||
set_config("MZLA_RNP_CC", rnp_compiler.rnp_cc)
|
||||
set_config("MZLA_RNP_CXX", rnp_compiler.rnp_cxx)
|
||||
|
|
Загрузка…
Ссылка в новой задаче