Fix optional neon support
On Android, we detect neon support at runtime and switch implementations based on that. This requires that some parts of skia are compiled with -mfpu=neon. To support this, the -mfpu flag is moved out of the 'compiler' config and into its own config. A target can then remove this config and supply its own -mfpu flag (without having to duplicate all the other stuff in the 'compiler' config). BUG=359249 Review URL: https://codereview.chromium.org/371853007 git-svn-id: http://src.chromium.org/svn/trunk/src/build@286038 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
5eb3802f61
Коммит
e113a571c9
|
@ -310,6 +310,7 @@ _native_compiler_configs = [
|
|||
"//build/config:feature_flags",
|
||||
|
||||
"//build/config/compiler:compiler",
|
||||
"//build/config/compiler:compiler_arm_fpu",
|
||||
"//build/config/compiler:chromium_code",
|
||||
"//build/config/compiler:default_include_dirs",
|
||||
"//build/config/compiler:default_warnings",
|
||||
|
|
|
@ -21,7 +21,7 @@ if (cpu_arch == "arm") {
|
|||
|
||||
if (is_android) {
|
||||
arm_use_neon = false
|
||||
arm_optionally_use_neon = false
|
||||
arm_optionally_use_neon = true
|
||||
} else {
|
||||
arm_use_neon = true
|
||||
arm_optionally_use_neon = true
|
||||
|
|
|
@ -134,7 +134,6 @@ config("compiler") {
|
|||
if (!is_android_webview_build) {
|
||||
cflags += [
|
||||
"-march=$arm_arch",
|
||||
"-mfpu=$arm_fpu",
|
||||
"-mfloat-abi=$arm_float_abi",
|
||||
]
|
||||
if (arm_tune != "") {
|
||||
|
@ -314,6 +313,14 @@ config("compiler") {
|
|||
}
|
||||
}
|
||||
|
||||
config("compiler_arm_fpu") {
|
||||
if (cpu_arch == "arm" && !is_android_webview_build) {
|
||||
cflags = [
|
||||
"-mfpu=$arm_fpu",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# runtime_library -------------------------------------------------------------
|
||||
#
|
||||
# Sets the runtime library and associated options.
|
||||
|
|
Загрузка…
Ссылка в новой задаче