Chromium Code Reviews| Index: build/common.gypi |
| diff --git a/build/common.gypi b/build/common.gypi |
| index a3c9ed0943bb9cac601e3ee3e43f43c04e2cd6fa..a86f3ae8a1ba2727aba17bc3581811f5f9c4d622 100644 |
| --- a/build/common.gypi |
| +++ b/build/common.gypi |
| @@ -136,55 +136,123 @@ |
| 'defines': [ |
| 'V8_TARGET_ARCH_ARM', |
| ], |
| + 'variables': { |
| + 'armsimulator': '<!($(echo <(CXX)) -v 2>&1 | grep -q "^Target: arm" && echo "no" || echo "yes")', |
| + }, |
| 'conditions': [ |
| - ['armv7==1', { |
| - 'defines': [ |
| - 'CAN_USE_ARMV7_INSTRUCTIONS=1', |
| - ], |
| - }], |
| [ 'v8_can_use_unaligned_accesses=="true"', { |
| 'defines': [ |
| 'CAN_USE_UNALIGNED_ACCESSES=1', |
| ], |
| - }], |
| - [ 'v8_can_use_unaligned_accesses=="false"', { |
| + }, { |
| 'defines': [ |
| 'CAN_USE_UNALIGNED_ACCESSES=0', |
| ], |
| }], |
| - # NEON implies VFP3 and VFP3 implies VFP2. |
| - [ 'v8_can_use_vfp2_instructions=="true" or arm_neon==1 or \ |
| - arm_fpu=="vfpv3" or arm_fpu=="vfpv3-d16"', { |
| - 'defines': [ |
| - 'CAN_USE_VFP2_INSTRUCTIONS', |
| - ], |
| - }], |
| - # NEON implies VFP3. |
| - [ 'v8_can_use_vfp3_instructions=="true" or arm_neon==1 or \ |
| - arm_fpu=="vfpv3" or arm_fpu=="vfpv3-d16"', { |
| - 'defines': [ |
| - 'CAN_USE_VFP3_INSTRUCTIONS', |
| - ], |
| - }], |
| - [ 'v8_use_arm_eabi_hardfloat=="true"', { |
| - 'defines': [ |
| - 'USE_EABI_HARDFLOAT=1', |
| - 'CAN_USE_VFP2_INSTRUCTIONS', |
| - ], |
| - 'target_conditions': [ |
| - ['_toolset=="target"', { |
| - 'cflags': ['-mfloat-abi=hard',], |
| + ['armsimulator=="no"', { |
| + 'conditions': [ |
| + [ 'armv7==1', { |
| + 'target_conditions': [ |
|
Jakob Kummerow
2013/04/16 11:36:08
Refactoring suggestion (feel free to ignore if you
Rodolph Perfetta
2013/04/16 14:15:56
Done.
|
| + ['_toolset=="target"', { |
| + 'cflags': ['-march=armv7-a',], |
| + }], |
| + ], |
| + }], |
| + [ 'armv7==1 or armv7=="default"', { |
| + 'conditions': [ |
| + [ 'arm_neon==1', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': ['-mfpu=neon',], |
| + }], |
| + ], |
| + }, |
| + { |
| + 'conditions': [ |
| + [ 'arm_fpu!="default"', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': ['-mfpu=<(arm_fpu)',], |
| + }], |
| + ], |
| + }], |
| + ] |
| + }], |
| + ] |
| + }], |
| + [ 'arm_float_abi!="default"', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': ['-mfloat-abi=<(arm_float_abi)',], |
| + }], |
| + ], |
| + }], |
| + [ 'arm_thumb==1', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': ['-mthumb',], |
| + }], |
| + ], |
| + }], |
| + [ 'arm_thumb==0', { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'cflags': ['-marm',], |
| + }], |
| + ], |
| + }], |
| + [ 'arm_test=="on"', { |
| + 'defines': [ |
| + 'ARM_TEST', |
| + ], |
| }], |
| - ], |
| - }, { |
| - 'defines': [ |
| - 'USE_EABI_HARDFLOAT=0', |
| ], |
| }], |
| - [ 'v8_can_use_vfp32dregs=="true"', { |
| + ['armsimulator=="yes"', { |
| 'defines': [ |
| - 'CAN_USE_VFP32DREGS', |
| + 'ARM_TEST', |
| ], |
| + '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', |
| + ], |
| + }], |
| + ] |
| }], |
| ], |
| }], # v8_target_arch=="arm" |