Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: build/common.gypi

Issue 16313003: ARM: Fix build flags for snapshot generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add trailing commas Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 2e3c7854d528e9182980d02f14a98958517b3019..127749a47380591ff3e0d9cc96a0f06034068a68 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -129,22 +129,13 @@
'defines': [
'V8_TARGET_ARCH_ARM',
],
- 'variables': {
- 'armsimulator': '<!($(echo <(CXX)) -v 2>&1 | grep -q "^Target: arm" && echo "no" || echo "yes")',
- },
- 'conditions': [
- [ 'v8_can_use_unaligned_accesses=="true"', {
- 'defines': [
- 'CAN_USE_UNALIGNED_ACCESSES=1',
- ],
- }, {
- 'defines': [
- 'CAN_USE_UNALIGNED_ACCESSES=0',
- ],
- }],
- ['armsimulator=="no"', {
- 'target_conditions': [
- ['_toolset=="target"', {
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'variables': {
+ 'armcompiler': '<!($(echo ${CXX_host:-$(which g++)}) -v 2>&1 | grep -q "^Target: arm" && echo "yes" || echo "no")',
+ },
+ 'conditions': [
+ ['armcompiler=="yes"', {
'conditions': [
[ 'armv7==1', {
'cflags': ['-march=armv7-a',],
@@ -159,9 +150,9 @@
[ 'arm_fpu!="default"', {
'cflags': ['-mfpu=<(arm_fpu)',],
}],
- ]
+ ],
}],
- ]
+ ],
}],
[ 'arm_float_abi!="default"', {
'cflags': ['-mfloat-abi=<(arm_float_abi)',],
@@ -172,63 +163,149 @@
[ 'arm_thumb==0', {
'cflags': ['-marm',],
}],
+ [ 'arm_test=="on"', {
+ 'defines': [
+ 'ARM_TEST',
+ ],
+ }],
+ ],
+ }, {
+ # armcompiler=="no"
+ 'conditions': [
+ [ 'armv7==1 or armv7=="default"', {
+ 'defines': [
+ 'CAN_USE_ARMV7_INSTRUCTIONS=1',
+ ],
+ 'conditions': [
+ [ 'arm_fpu=="default"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ ],
+ }],
+ [ 'arm_fpu=="vfpv3-d16"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ ],
+ }],
+ [ 'arm_fpu=="vfpv3"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ 'CAN_USE_VFP32DREGS',
+ ],
+ }],
+ [ 'arm_fpu=="neon" or arm_neon==1', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ 'CAN_USE_VFP32DREGS',
+ ],
+ }],
+ ],
+ }],
+ [ 'arm_float_abi=="hard"', {
+ 'defines': [
+ 'USE_EABI_HARDFLOAT=1',
+ ],
+ }],
+ [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
+ 'defines': [
+ 'USE_EABI_HARDFLOAT=0',
+ ],
+ }],
],
- }],
- ],
- 'conditions': [
- [ 'arm_test=="on"', {
'defines': [
'ARM_TEST',
],
}],
],
- }],
- ['armsimulator=="yes"', {
- 'defines': [
- 'ARM_TEST',
- ],
+ }], # _toolset=="host"
+ ['_toolset=="target"', {
+ 'variables': {
+ 'armcompiler': '<!($(echo ${CXX_target:-<(CXX)}) -v 2>&1 | grep -q "^Target: arm" && echo "yes" || echo "no")',
+ },
'conditions': [
- [ 'armv7==1 or armv7=="default"', {
- 'defines': [
- 'CAN_USE_ARMV7_INSTRUCTIONS=1',
- ],
+ ['armcompiler=="yes"', {
'conditions': [
- [ 'arm_fpu=="default"', {
+ [ 'armv7==1', {
+ 'cflags': ['-march=armv7-a',],
+ }],
+ [ 'armv7==1 or armv7=="default"', {
+ 'conditions': [
+ [ 'arm_neon==1', {
+ 'cflags': ['-mfpu=neon',],
+ },
+ {
+ 'conditions': [
+ [ 'arm_fpu!="default"', {
+ 'cflags': ['-mfpu=<(arm_fpu)',],
+ }],
+ ],
+ }],
+ ],
+ }],
+ [ 'arm_float_abi!="default"', {
+ 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
+ }],
+ [ 'arm_thumb==1', {
+ 'cflags': ['-mthumb',],
+ }],
+ [ 'arm_thumb==0', {
+ 'cflags': ['-marm',],
+ }],
+ [ 'arm_test=="on"', {
'defines': [
- 'CAN_USE_VFP3_INSTRUCTIONS',
+ 'ARM_TEST',
],
}],
- [ 'arm_fpu=="vfpv3-d16"', {
+ ],
+ }, {
+ # armcompiler=="no"
+ 'conditions': [
+ [ 'armv7==1 or armv7=="default"', {
'defines': [
- 'CAN_USE_VFP3_INSTRUCTIONS',
+ 'CAN_USE_ARMV7_INSTRUCTIONS=1',
+ ],
+ 'conditions': [
+ [ 'arm_fpu=="default"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ ],
+ }],
+ [ 'arm_fpu=="vfpv3-d16"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ ],
+ }],
+ [ 'arm_fpu=="vfpv3"', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ 'CAN_USE_VFP32DREGS',
+ ],
+ }],
+ [ 'arm_fpu=="neon" or arm_neon==1', {
+ 'defines': [
+ 'CAN_USE_VFP3_INSTRUCTIONS',
+ 'CAN_USE_VFP32DREGS',
+ ],
+ }],
],
}],
- [ 'arm_fpu=="vfpv3"', {
+ [ 'arm_float_abi=="hard"', {
'defines': [
- 'CAN_USE_VFP3_INSTRUCTIONS',
- 'CAN_USE_VFP32DREGS',
+ 'USE_EABI_HARDFLOAT=1',
],
}],
- [ 'arm_fpu=="neon" or arm_neon==1', {
+ [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
'defines': [
- 'CAN_USE_VFP3_INSTRUCTIONS',
- 'CAN_USE_VFP32DREGS',
+ 'USE_EABI_HARDFLOAT=0',
],
}],
],
- }],
- [ 'arm_float_abi=="hard"', {
'defines': [
- 'USE_EABI_HARDFLOAT=1',
- ],
- }],
- [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
- 'defines': [
- 'USE_EABI_HARDFLOAT=0',
+ 'ARM_TEST',
],
}],
- ]
- }],
+ ],
+ }], # _toolset=="target"
],
}], # v8_target_arch=="arm"
['v8_target_arch=="ia32"', {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698