Roll GN binaries to #317120 for the cpu_arch changes
The newest version of GN replaces the 'cpu_arch' and 'os' variables with 'current_cpu', 'target_cpu', 'current_os', and 'target_os', and also replaces 'build_cpu' with 'host_cpu', and 'build_os' with 'host_os'. The roll also picks up the change to add a new 'gn clean' command, some absolute path handling fixes, a check_includes fix for action_foreach(), and some minor internal fixes. This patch also updates the build config files to accommodate the GN changes in a backwards-compatible manner, i.e., the configs now will set cpu_arch and os correctly in the right contexts. They will also allow the users to continue to set os= and cpu_arch= in an args file, so no user builds (or bots) will break. Once all of the bots and all of the build files have been updated to refer to the new variables instead of the old ones, we can drop the backwards-compatible versions. TBR=brettw@chromium.org BUG=344767 CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg Review URL: https://codereview.chromium.org/936103003 Cr-Original-Commit-Position: refs/heads/master@{#317186} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 7ee02bed35766535521c8e1f072b98cbf9eef53d
This commit is contained in:
Родитель
b6c3268ad3
Коммит
ef1bc954a4
|
@ -16,7 +16,47 @@
|
|||
# KEEP IN ALPHABETICAL ORDER and write a good description for everything.
|
||||
# Use "is_*" names for intrinsic platform descriptions and build modes, and
|
||||
# "use_*" names for optional features libraries, and configurations.
|
||||
|
||||
# TODO(dpranke): The os and cpu_arch variables exist for backwards
|
||||
# compatibility and should be deleted once all of the build files and
|
||||
# bots have been updated to use current_cpu/target_cpu and
|
||||
# current_os/target_os instead.
|
||||
|
||||
if (target_os == "") {
|
||||
if (defined(os)) {
|
||||
# If os is defined, it was set in an args file and needs to be
|
||||
# used for backwards-compatibility.
|
||||
target_os = os
|
||||
} else {
|
||||
target_os = host_os
|
||||
}
|
||||
}
|
||||
|
||||
if (target_cpu == "") {
|
||||
if (defined(cpu_arch)) {
|
||||
# If cpu_arch is defined, it was set in an args file and needs to be
|
||||
# used for backwards-compatibility.
|
||||
target_cpu = cpu_arch
|
||||
} else {
|
||||
target_cpu = host_cpu
|
||||
}
|
||||
}
|
||||
|
||||
if (current_cpu == "") {
|
||||
current_cpu = target_cpu
|
||||
}
|
||||
if (current_os == "") {
|
||||
current_os = target_os
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
# TODO(dpranke): These values are here for backwards compatibility and
|
||||
# should be deleted when all of the builders and configs have been updated.
|
||||
cpu_arch = target_cpu
|
||||
os = target_os
|
||||
build_cpu_arch = host_cpu
|
||||
build_os = host_os
|
||||
|
||||
# How many symbols to include in the build. This affects the performance of
|
||||
# the build since the symbols are large and dealing with them is slow.
|
||||
# 2 means regular build with symbols.
|
||||
|
@ -83,6 +123,10 @@ declare_args() {
|
|||
link_chrome_on_windows = true
|
||||
}
|
||||
|
||||
# TODO(dpranke): Remove these asserts when os and cpu_arch are removed.
|
||||
assert(current_cpu == cpu_arch)
|
||||
assert(current_os == os)
|
||||
|
||||
# =============================================================================
|
||||
# OS DEFINITIONS
|
||||
# =============================================================================
|
||||
|
|
|
@ -51,7 +51,7 @@ template("android_gcc_toolchain") {
|
|||
ld = cxx
|
||||
|
||||
toolchain_os = "android"
|
||||
toolchain_cpu_arch = invoker.toolchain_cpu_arch
|
||||
toolchain_cpu = invoker.toolchain_cpu
|
||||
|
||||
# We make the assumption that the gcc_toolchain will produce a soname with
|
||||
# the following definition.
|
||||
|
@ -85,7 +85,7 @@ android_gcc_toolchain("x86") {
|
|||
android_ndk_lib_dir = "usr/lib"
|
||||
|
||||
tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-"
|
||||
toolchain_cpu_arch = "x86"
|
||||
toolchain_cpu = "x86"
|
||||
}
|
||||
|
||||
android_gcc_toolchain("arm") {
|
||||
|
@ -93,7 +93,7 @@ android_gcc_toolchain("arm") {
|
|||
android_ndk_lib_dir = "usr/lib"
|
||||
|
||||
tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-"
|
||||
toolchain_cpu_arch = "arm"
|
||||
toolchain_cpu = "arm"
|
||||
}
|
||||
|
||||
android_gcc_toolchain("mipsel") {
|
||||
|
@ -101,7 +101,7 @@ android_gcc_toolchain("mipsel") {
|
|||
android_ndk_lib_dir = "usr/lib"
|
||||
|
||||
tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-"
|
||||
toolchain_cpu_arch = "mipsel"
|
||||
toolchain_cpu = "mipsel"
|
||||
}
|
||||
|
||||
android_gcc_toolchain("x64") {
|
||||
|
@ -109,7 +109,7 @@ android_gcc_toolchain("x64") {
|
|||
android_ndk_lib_dir = "usr/lib64"
|
||||
|
||||
tool_prefix = "$x86_64_android_toolchain_root/bin/x86_64-linux-android-"
|
||||
toolchain_cpu_arch = "x86_64"
|
||||
toolchain_cpu = "x86_64"
|
||||
}
|
||||
|
||||
android_gcc_toolchain("arm64") {
|
||||
|
@ -117,7 +117,7 @@ android_gcc_toolchain("arm64") {
|
|||
android_ndk_lib_dir = "usr/lib"
|
||||
|
||||
tool_prefix = "$arm64_android_toolchain_root/bin/arm-linux-androideabi-"
|
||||
toolchain_cpu_arch = "aarch64"
|
||||
toolchain_cpu = "aarch64"
|
||||
}
|
||||
|
||||
android_gcc_toolchain("mips64el") {
|
||||
|
@ -125,5 +125,5 @@ android_gcc_toolchain("mips64el") {
|
|||
android_ndk_lib_dir = "usr/lib64"
|
||||
|
||||
tool_prefix = "$mips64_android_toolchain_root/bin/mipsel-linux-android-"
|
||||
toolchain_cpu_arch = "mipsel64el"
|
||||
toolchain_cpu = "mipsel64el"
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ gcc_toolchain("target") {
|
|||
ar = "${cros_target_ar}"
|
||||
ld = cxx
|
||||
|
||||
toolchain_cpu_arch = "${cpu_arch}"
|
||||
toolchain_cpu = "${target_cpu}"
|
||||
toolchain_os = "linux"
|
||||
is_clang = is_clang
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ template("gcc_toolchain") {
|
|||
assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value")
|
||||
assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value")
|
||||
assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value")
|
||||
assert(defined(invoker.toolchain_cpu_arch),
|
||||
"gcc_toolchain() must specify a \"toolchain_cpu_arch\"")
|
||||
assert(defined(invoker.toolchain_cpu),
|
||||
"gcc_toolchain() must specify a \"toolchain_cpu\"")
|
||||
assert(defined(invoker.toolchain_os),
|
||||
"gcc_toolchain() must specify a \"toolchain_os\"")
|
||||
|
||||
|
@ -204,8 +204,19 @@ template("gcc_toolchain") {
|
|||
# When invoking this toolchain not as the default one, these args will be
|
||||
# passed to the build. They are ignored when this is the default toolchain.
|
||||
toolchain_args() {
|
||||
cpu_arch = invoker.toolchain_cpu_arch
|
||||
os = invoker.toolchain_os
|
||||
current_cpu = invoker.toolchain_cpu
|
||||
current_os = invoker.toolchain_os
|
||||
|
||||
# These values need to be passed through unchanged.
|
||||
target_os = target_os
|
||||
target_cpu = target_cpu
|
||||
|
||||
# TODO(dpranke): These values are here for backwards compatibility and
|
||||
# should be deleted when all of the builders and configs have been
|
||||
# updated.
|
||||
cpu_arch = current_cpu
|
||||
os = current_os
|
||||
|
||||
if (defined(invoker.is_clang)) {
|
||||
is_clang = invoker.is_clang
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ gcc_toolchain("arm") {
|
|||
ar = "arm-linux-gnueabi-ar"
|
||||
ld = cxx
|
||||
|
||||
toolchain_cpu_arch = "arm"
|
||||
toolchain_cpu = "arm"
|
||||
toolchain_os = "linux"
|
||||
is_clang = false
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ gcc_toolchain("clang_x86") {
|
|||
ar = "ar"
|
||||
ld = cxx
|
||||
|
||||
toolchain_cpu_arch = "x86"
|
||||
toolchain_cpu = "x86"
|
||||
toolchain_os = "linux"
|
||||
is_clang = true
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ gcc_toolchain("x86") {
|
|||
ar = "ar"
|
||||
ld = cxx
|
||||
|
||||
toolchain_cpu_arch = "x86"
|
||||
toolchain_cpu = "x86"
|
||||
toolchain_os = "linux"
|
||||
is_clang = false
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ gcc_toolchain("clang_x64") {
|
|||
ar = "ar"
|
||||
ld = cxx
|
||||
|
||||
toolchain_cpu_arch = "x64"
|
||||
toolchain_cpu = "x64"
|
||||
toolchain_os = "linux"
|
||||
is_clang = true
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ gcc_toolchain("x64") {
|
|||
ar = "ar"
|
||||
ld = cxx
|
||||
|
||||
toolchain_cpu_arch = "x64"
|
||||
toolchain_cpu = "x64"
|
||||
toolchain_os = "linux"
|
||||
is_clang = false
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ gcc_toolchain("mipsel") {
|
|||
ar = "mipsel-linux-gnu-ar"
|
||||
ld = cxx
|
||||
|
||||
toolchain_cpu_arch = "mipsel"
|
||||
toolchain_cpu = "mipsel"
|
||||
toolchain_os = "linux"
|
||||
is_clang = false
|
||||
}
|
||||
|
|
|
@ -194,7 +194,10 @@ template("mac_clang_toolchain") {
|
|||
}
|
||||
|
||||
toolchain_args() {
|
||||
os = invoker.toolchain_os
|
||||
current_os = invoker.toolchain_os
|
||||
|
||||
# TODO(dpranke): os is here for backwards compatibility.
|
||||
os = current_os
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -200,7 +200,10 @@ template("msvc_toolchain") {
|
|||
# When invoking this toolchain not as the default one, these args will be
|
||||
# passed to the build. They are ignored when this is the default toolchain.
|
||||
toolchain_args() {
|
||||
cpu_arch = invoker.cpu_arch
|
||||
current_cpu = invoker.current_cpu
|
||||
|
||||
# TODO(dpranke): cpu_arch is here for backwards compatibility.
|
||||
cpu_arch = current_cpu
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -212,13 +215,15 @@ template("msvc_toolchain") {
|
|||
if (cpu_arch == "x86") {
|
||||
msvc_toolchain("32") {
|
||||
environment = "environment.x86"
|
||||
cpu_arch = "x86"
|
||||
|
||||
current_cpu = "x86"
|
||||
}
|
||||
}
|
||||
|
||||
if (cpu_arch == "x64") {
|
||||
msvc_toolchain("64") {
|
||||
environment = "environment.x64"
|
||||
cpu_arch = "x64"
|
||||
|
||||
current_cpu = "x64"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче