aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp/common_conditions.gypi
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-08-05 14:17:32 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-05 14:17:32 -0700
commitf62833d9c9075dd1028ef4395e3370d2597d9115 (patch)
tree8319f4f020dcbd9261acbc9371b860e74bca33c9 /gyp/common_conditions.gypi
parent7b77ac100e98f1037ae907c8830b808361f211e1 (diff)
Detect MIPS DSP and DSPR2 programattically.
Procedure: $ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -dM -E - < /dev/null | sort > vanilla.mips $ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -mdsp -dM -E - < /dev/null | sort > dsp.mips $ platform_tools/android/toolchains/ndk-r10c-mips-darwin_v14/bin/mipsel-linux-android-gcc -mdspr2 -dM -E - < /dev/null | sort > dspr2.mips $ diff vanilla.mips dsp.mips 239a240,241 > #define __mips_dsp 1 > #define __mips_dsp_rev 1 $ diff vanilla.mips dspr2.mips 239a240,242 > #define __mips_dsp 1 > #define __mips_dsp_rev 2 > #define __mips_dspr2 1 So, defined(__mips_dsp) -> SK_MIPS_HAS_DSP, defined(__mips_dspr2) -> SK_MIPS_HAS_DSPR2. BUG=skia: Review URL: https://codereview.chromium.org/1274873002
Diffstat (limited to 'gyp/common_conditions.gypi')
-rw-r--r--gyp/common_conditions.gypi27
1 files changed, 4 insertions, 23 deletions
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index cce9f151b8..2a927d1a54 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -296,32 +296,13 @@
],
}],
[ '"mips" in skia_arch_type', {
- 'cflags': [
- '-EL',
- ],
+ 'cflags': [ '-EL' ],
'conditions': [
[ 'mips_arch_variant == "mips32r2"', {
- 'cflags': [
- '-march=mips32r2',
- ],
+ 'cflags': [ '-march=mips32r2' ],
'conditions': [
- [ 'mips_dsp == 1', {
- 'cflags': [
- '-mdsp',
- ],
- 'defines': [
- 'SK_MIPS_HAS_DSP',
- ],
- }],
- [ 'mips_dsp == 2', {
- 'cflags': [
- '-mdspr2',
- ],
- 'defines': [
- 'SK_MIPS_HAS_DSP',
- 'SK_MIPS_HAS_DSPR2',
- ],
- }],
+ [ 'mips_dsp == 1', { 'cflags': [ '-mdsp' ] }],
+ [ 'mips_dsp == 2', { 'cflags': [ '-mdspr2' ] }],
],
}],
],