Commit 7556e52a authored by ulan@chromium.org's avatar ulan@chromium.org

ARM: Fix build flags for snapshot generation.

The existing code ignores armv7 and arm_fpu flags since r14288.

R=jkummerow@chromium.org, rodolph.perfetta@gmail.com

Review URL: https://chromiumcodereview.appspot.com/16313003

Patch from Jakob Kummerow <jkummerow@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a3dccd15
......@@ -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"', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment