mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
build: Support -mcpu= on ARM and ARM64
This commit is contained in:
parent
47ce50707a
commit
4462d99b15
@ -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") {
|
||||||
@ -123,4 +125,7 @@ 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 = ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -843,6 +843,10 @@ config("compiler_cpu_abi") {
|
|||||||
"-march=$arm_arch",
|
"-march=$arm_arch",
|
||||||
"-mfloat-abi=$arm_float_abi",
|
"-mfloat-abi=$arm_float_abi",
|
||||||
]
|
]
|
||||||
|
if (arm_cpu != "") {
|
||||||
|
cflags += [ "-mcpu=$arm_cpu" ]
|
||||||
|
}
|
||||||
|
ldflags += [ "-mfloat-abi=$arm_float_abi" ]
|
||||||
}
|
}
|
||||||
if (arm_tune != "") {
|
if (arm_tune != "") {
|
||||||
cflags += [ "-mtune=$arm_tune" ]
|
cflags += [ "-mtune=$arm_tune" ]
|
||||||
@ -852,6 +856,9 @@ config("compiler_cpu_abi") {
|
|||||||
cflags += [ "--target=aarch64-linux-gnu" ]
|
cflags += [ "--target=aarch64-linux-gnu" ]
|
||||||
ldflags += [ "--target=aarch64-linux-gnu" ]
|
ldflags += [ "--target=aarch64-linux-gnu" ]
|
||||||
}
|
}
|
||||||
|
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