mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 08:16:09 +03:00
build: Support ARM -mcpu= flag
This commit is contained in:
parent
69a6617c0f
commit
dfc2c39507
@ -41,6 +41,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 = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(arm_float_abi == "" || arm_float_abi == "hard" ||
|
assert(arm_float_abi == "" || arm_float_abi == "hard" ||
|
||||||
|
@ -746,7 +746,7 @@ config("compiler_cpu_abi") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else if (current_cpu == "arm") {
|
} else if (current_cpu == "arm") {
|
||||||
if (is_clang && !is_android && !is_nacl) {
|
if (is_clang && !is_android && !is_nacl && custom_toolchain == "") {
|
||||||
cflags += [ "--target=arm-linux-gnueabihf" ]
|
cflags += [ "--target=arm-linux-gnueabihf" ]
|
||||||
ldflags += [ "--target=arm-linux-gnueabihf" ]
|
ldflags += [ "--target=arm-linux-gnueabihf" ]
|
||||||
}
|
}
|
||||||
@ -755,12 +755,16 @@ 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" ]
|
||||||
}
|
}
|
||||||
} else if (current_cpu == "arm64") {
|
} else if (current_cpu == "arm64") {
|
||||||
if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
|
if (is_clang && !is_android && !is_nacl && !is_fuchsia && custom_toolchain == "") {
|
||||||
cflags += [ "--target=aarch64-linux-gnu" ]
|
cflags += [ "--target=aarch64-linux-gnu" ]
|
||||||
ldflags += [ "--target=aarch64-linux-gnu" ]
|
ldflags += [ "--target=aarch64-linux-gnu" ]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user