mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
build: Support -mcpu= on ARM and ARM64
This commit is contained in:
parent
7d0f4c500f
commit
9428cf118f
@ -36,6 +36,8 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
|
|||||||
# Thumb is a reduced instruction set available on some ARM processors that
|
# Thumb is a reduced instruction set available on some ARM processors that
|
||||||
# has increased code density.
|
# has increased code density.
|
||||||
arm_use_thumb = true
|
arm_use_thumb = true
|
||||||
|
|
||||||
|
arm_cpu = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_os == "android" || target_os == "android") {
|
if (current_os == "android" || target_os == "android") {
|
||||||
@ -124,6 +126,9 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
|
|||||||
# arm64 supports only "hard".
|
# arm64 supports only "hard".
|
||||||
arm_float_abi = "hard"
|
arm_float_abi = "hard"
|
||||||
arm_use_neon = true
|
arm_use_neon = true
|
||||||
|
declare_args() {
|
||||||
|
arm_cpu = ""
|
||||||
|
}
|
||||||
declare_args() {
|
declare_args() {
|
||||||
# Enables the new Armv8 branch protection features. Valid strings are:
|
# Enables the new Armv8 branch protection features. Valid strings are:
|
||||||
# - "pac": Enables Pointer Authentication Code (PAC, featured in Armv8.3)
|
# - "pac": Enables Pointer Authentication Code (PAC, featured in Armv8.3)
|
||||||
|
@ -726,7 +726,11 @@ config("compiler") {
|
|||||||
# TODO(pcc): The contents of .ARM.attributes should be based on the
|
# TODO(pcc): The contents of .ARM.attributes should be based on the
|
||||||
# -march flag passed at compile time (see llvm.org/pr36291).
|
# -march flag passed at compile time (see llvm.org/pr36291).
|
||||||
if (current_cpu == "arm") {
|
if (current_cpu == "arm") {
|
||||||
ldflags += [ "-march=$arm_arch" ]
|
if (arm_cpu != "") {
|
||||||
|
ldflags += [ "-mcpu=$arm_cpu" ]
|
||||||
|
} else {
|
||||||
|
ldflags += [ "-march=$arm_arch" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -915,9 +919,14 @@ config("compiler_cpu_abi") {
|
|||||||
}
|
}
|
||||||
if (!is_nacl) {
|
if (!is_nacl) {
|
||||||
cflags += [
|
cflags += [
|
||||||
"-march=$arm_arch",
|
|
||||||
"-mfloat-abi=$arm_float_abi",
|
"-mfloat-abi=$arm_float_abi",
|
||||||
]
|
]
|
||||||
|
if (arm_cpu != "") {
|
||||||
|
cflags += [ "-mcpu=$arm_cpu" ]
|
||||||
|
} else {
|
||||||
|
cflags += [ "-march=$arm_arch" ]
|
||||||
|
}
|
||||||
|
ldflags += [ "-mfloat-abi=$arm_float_abi" ]
|
||||||
}
|
}
|
||||||
if (arm_tune != "") {
|
if (arm_tune != "") {
|
||||||
cflags += [ "-mtune=$arm_tune" ]
|
cflags += [ "-mtune=$arm_tune" ]
|
||||||
@ -931,6 +940,9 @@ config("compiler_cpu_abi") {
|
|||||||
# Outline atomics crash on Exynos 9810. http://crbug.com/1272795
|
# Outline atomics crash on Exynos 9810. http://crbug.com/1272795
|
||||||
cflags += [ "-mno-outline-atomics" ]
|
cflags += [ "-mno-outline-atomics" ]
|
||||||
}
|
}
|
||||||
|
if (arm_cpu != "") {
|
||||||
|
cflags += [ "-mcpu=$arm_cpu" ]
|
||||||
|
}
|
||||||
} else if (current_cpu == "mipsel" && !is_nacl) {
|
} else if (current_cpu == "mipsel" && !is_nacl) {
|
||||||
ldflags += [ "-Wl,--hash-style=sysv" ]
|
ldflags += [ "-Wl,--hash-style=sysv" ]
|
||||||
if (custom_toolchain == "") {
|
if (custom_toolchain == "") {
|
||||||
|
Loading…
Reference in New Issue
Block a user