summaryrefslogtreecommitdiffstats
path: root/src/core/gyp_run.pro
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gyp_run.pro')
-rw-r--r--src/core/gyp_run.pro16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro
index 2cc13b7ea..9ab8ff6fc 100644
--- a/src/core/gyp_run.pro
+++ b/src/core/gyp_run.pro
@@ -28,12 +28,6 @@ cross_compile {
MARCH = $$extractCFlag("-march=.*")
!isEmpty(MARCH): GYP_ARGS += "-D arm_arch=\"$$MARCH\""
- MFPU = $$extractCFlag("-mfpu=.*")
- !isEmpty(MFPU) {
- GYP_ARGS += "-D arm_fpu=\"$$MFPU\""
- contains(MFPU, "neon"): GYP_ARGS += "-D arm_neon=1"
- }
-
MTUNE = $$extractCFlag("-mtune=.*")
!isEmpty(MTUNE): GYP_ARGS += "-D arm_tune=\"$$MTUNE\""
@@ -47,6 +41,16 @@ cross_compile {
GYP_ARGS += "-D arm_version=\"$$MARMV\""
}
+ MFPU = $$extractCFlag("-mfpu=.*")
+ !isEmpty(MFPU) {
+ # If the toolchain does not explicitly specify to use NEON instructions
+ # we use arm_neon_optional for ARMv7 and newer and let chromium decide
+ # about the mfpu option.
+ contains(MFPU, "neon"): GYP_ARGS += "-D arm_fpu=\"$$MFPU\" -D arm_neon=1"
+ else:!lessThan(MARMV, 7): GYP_ARGS += "-D arm_neon=0 -D arm_neon_optional=1"
+ else: GYP_ARGS += "-D arm_fpu=\"$$MFPU\""
+ }
+
contains(QMAKE_CFLAGS, "-mthumb"): GYP_ARGS += "-D arm_thumb=1"
}