зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1770302 - Consolidate how the clang targets are configured. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D146874
This commit is contained in:
Родитель
9bd4f1813b
Коммит
6b10bc399b
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"stages": "1"
|
||||
"stages": "1",
|
||||
"targets": "X86;ARM;AArch64;WebAssembly"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"stages": "4",
|
||||
"targets": "X86;ARM;AArch64;WebAssembly",
|
||||
"pgo": true
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ build-clang.py accepts a JSON config format with the following fields:
|
|||
* ld: Path to the linker.
|
||||
* patches: Optional list of patches to apply.
|
||||
* build_type: The type of build to make. Supported types: Release, Debug, RelWithDebInfo or MinSizeRel.
|
||||
* targets: The targets supported by the final stage LLVM/clang.
|
||||
* build_clang_tidy: Whether to build clang-tidy with the Mozilla checks imported. The default is false.
|
||||
* osx_cross_compile: Whether to invoke CMake for OS X cross compile builds.
|
||||
* assertions: Whether to enable LLVM assertions. The default is false.
|
||||
|
|
|
@ -196,7 +196,7 @@ def build_one_stage(
|
|||
build_type,
|
||||
assertions,
|
||||
libcxx_include_dir,
|
||||
build_wasm,
|
||||
targets,
|
||||
is_final_stage=False,
|
||||
profile=None,
|
||||
):
|
||||
|
@ -211,9 +211,7 @@ def build_one_stage(
|
|||
return path.replace("\\", "/")
|
||||
|
||||
def cmake_base_args(cc, cxx, asm, ld, ar, ranlib, libtool, inst_dir):
|
||||
machine_targets = "X86;ARM;AArch64" if is_final_stage else "X86"
|
||||
if build_wasm and is_final_stage:
|
||||
machine_targets += ";WebAssembly"
|
||||
machine_targets = targets if is_final_stage and targets else "X86"
|
||||
|
||||
cmake_args = [
|
||||
"-GNinja",
|
||||
|
@ -574,11 +572,7 @@ def main():
|
|||
"We only know how to do Release, Debug, RelWithDebInfo or "
|
||||
"MinSizeRel builds"
|
||||
)
|
||||
build_wasm = False
|
||||
if "build_wasm" in config:
|
||||
build_wasm = config["build_wasm"]
|
||||
if build_wasm not in (True, False):
|
||||
raise ValueError("Only boolean values are accepted for build_wasm.")
|
||||
targets = config.get("targets")
|
||||
build_clang_tidy = False
|
||||
if "build_clang_tidy" in config:
|
||||
build_clang_tidy = config["build_clang_tidy"]
|
||||
|
@ -766,7 +760,7 @@ def main():
|
|||
build_type,
|
||||
assertions,
|
||||
libcxx_include_dir,
|
||||
build_wasm,
|
||||
targets,
|
||||
is_final_stage=(stages == 1),
|
||||
)
|
||||
|
||||
|
@ -793,7 +787,7 @@ def main():
|
|||
build_type,
|
||||
assertions,
|
||||
libcxx_include_dir,
|
||||
build_wasm,
|
||||
targets,
|
||||
is_final_stage=(stages == 2),
|
||||
profile="gen" if pgo else None,
|
||||
)
|
||||
|
@ -821,7 +815,7 @@ def main():
|
|||
build_type,
|
||||
assertions,
|
||||
libcxx_include_dir,
|
||||
build_wasm,
|
||||
targets,
|
||||
(stages == 3),
|
||||
)
|
||||
if pgo:
|
||||
|
@ -865,7 +859,7 @@ def main():
|
|||
build_type,
|
||||
assertions,
|
||||
libcxx_include_dir,
|
||||
build_wasm,
|
||||
targets,
|
||||
(stages == 4),
|
||||
profile=profile,
|
||||
)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
"cc": "/usr/bin/gcc",
|
||||
"cxx": "/usr/bin/g++",
|
||||
"as": "/usr/bin/gcc",
|
||||
"build_wasm": false,
|
||||
"patches": [
|
||||
"profile-g4a10504e1f70c.patch"
|
||||
]
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"build_wasm": true,
|
||||
"cc": "/usr/lib/llvm-11/bin/clang",
|
||||
"cxx": "/usr/lib/llvm-11/bin/clang++",
|
||||
"as": "/usr/lib/llvm-11/bin/clang"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"build_wasm": true,
|
||||
"osx_cross_compile": true,
|
||||
"cc": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang++",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"build_wasm": true,
|
||||
"cc": "cl.exe",
|
||||
"cxx": "cl.exe",
|
||||
"ml": "ml64.exe"
|
||||
|
|
Загрузка…
Ссылка в новой задаче