66 lines
2.0 KiB
Diff
66 lines
2.0 KiB
Diff
--- a/build/config/compiler/BUILD.gn.orig
|
|
+++ b/build/config/compiler/BUILD.gn
|
|
@@ -58,6 +58,10 @@
|
|
}
|
|
|
|
declare_args() {
|
|
+ is_musl = false
|
|
+}
|
|
+
|
|
+declare_args() {
|
|
# Normally, Android builds are lightly optimized, even for debug builds, to
|
|
# keep binary size down. Setting this flag to true disables such optimization
|
|
android_full_debug = false
|
|
@@ -880,8 +884,13 @@
|
|
}
|
|
} else if (current_cpu == "arm64") {
|
|
if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
|
|
- cflags += [ "--target=aarch64-linux-gnu" ]
|
|
- ldflags += [ "--target=aarch64-linux-gnu" ]
|
|
+ if (is_musl) {
|
|
+ cflags += [ "--target=aarch64-linux-musl" ]
|
|
+ ldflags += [ "--target=aarch64-linux-musl" ]
|
|
+ } else {
|
|
+ cflags += [ "--target=aarch64-linux-gnu" ]
|
|
+ ldflags += [ "--target=aarch64-linux-gnu" ]
|
|
+ }
|
|
}
|
|
} else if (current_cpu == "mipsel" && !is_nacl) {
|
|
ldflags += [ "-Wl,--hash-style=sysv" ]
|
|
--- a/build/toolchain/linux/unbundle/BUILD.gn.orig
|
|
+++ b/build/toolchain/linux/unbundle/BUILD.gn
|
|
@@ -39,3 +39,22 @@
|
|
current_os = host_os
|
|
}
|
|
}
|
|
+
|
|
+gcc_toolchain("v8_snapshot_cross") {
|
|
+ cc = getenv("BUILD_CC")
|
|
+ cxx = getenv("BUILD_CXX")
|
|
+ ar = getenv("BUILD_AR")
|
|
+ nm = getenv("BUILD_NM")
|
|
+ ld = cxx
|
|
+
|
|
+ extra_cflags = getenv("BUILD_CFLAGS")
|
|
+ extra_cppflags = getenv("BUILD_CPPFLAGS")
|
|
+ extra_cxxflags = getenv("BUILD_CXXFLAGS")
|
|
+ extra_ldflags = getenv("BUILD_LDFLAGS")
|
|
+
|
|
+ toolchain_args = {
|
|
+ current_cpu = host_cpu
|
|
+ current_os = host_os
|
|
+ v8_current_cpu = target_cpu
|
|
+ }
|
|
+}
|
|
--- a/build/config/linux/pkg_config.gni.orig
|
|
+++ b/build/config/linux/pkg_config.gni
|
|
@@ -91,7 +91,7 @@
|
|
assert(defined(invoker.packages),
|
|
"Variable |packages| must be defined to be a list in pkg_config.")
|
|
config(target_name) {
|
|
- if (host_toolchain == current_toolchain) {
|
|
+ if (current_cpu != target_cpu) {
|
|
args = common_pkg_config_args + host_pkg_config_args + invoker.packages
|
|
} else {
|
|
args = common_pkg_config_args + pkg_config_args + invoker.packages
|