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

Side by Side Diff: build/toolchain.gypi

Issue 340373002: [Arm]: Simplify compile-time Arm feature detection. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Makefile ('k') | src/arm/assembler-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 the V8 project authors. All rights reserved. 1 # Copyright 2013 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 29 matching lines...) Expand all
40 # TODO(bradchen): get rid of nacl_target_arch when someday 40 # TODO(bradchen): get rid of nacl_target_arch when someday
41 # NaCl V8 builds stop using the ARM simulator 41 # NaCl V8 builds stop using the ARM simulator
42 'nacl_target_arch%': 'none', # must be set externally 42 'nacl_target_arch%': 'none', # must be set externally
43 43
44 # Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP 44 # Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP
45 # registers d16-d31 in the generated code, both in the snapshot and for the 45 # registers d16-d31 in the generated code, both in the snapshot and for the
46 # ARM target. Leaving the default value of 'false' will avoid the use of 46 # ARM target. Leaving the default value of 'false' will avoid the use of
47 # these registers in the snapshot and use CPU feature probing when running 47 # these registers in the snapshot and use CPU feature probing when running
48 # on the target. 48 # on the target.
49 'v8_can_use_vfp32dregs%': 'false', 49 'v8_can_use_vfp32dregs%': 'false',
50 'arm_test%': 'off', 50 'arm_test_noprobe%': 'off',
51 51
52 # Similar to vfp but on MIPS. 52 # Similar to vfp but on MIPS.
53 'v8_can_use_fpu_instructions%': 'true', 53 'v8_can_use_fpu_instructions%': 'true',
54 54
55 # Similar to the ARM hard float ABI but on MIPS. 55 # Similar to the ARM hard float ABI but on MIPS.
56 'v8_use_mips_abi_hardfloat%': 'true', 56 'v8_use_mips_abi_hardfloat%': 'true',
57 57
58 # Default arch variant for MIPS. 58 # Default arch variant for MIPS.
59 'mips_arch_variant%': 'mips32r2', 59 'mips_arch_variant%': 'mips32r2',
60 60
(...skipping 21 matching lines...) Expand all
82 82
83 # Allow to suppress the array bounds warning (default is no suppression). 83 # Allow to suppress the array bounds warning (default is no suppression).
84 'wno_array_bounds%': '', 84 'wno_array_bounds%': '',
85 }, 85 },
86 'target_defaults': { 86 'target_defaults': {
87 'conditions': [ 87 'conditions': [
88 ['v8_target_arch=="arm"', { 88 ['v8_target_arch=="arm"', {
89 'defines': [ 89 'defines': [
90 'V8_TARGET_ARCH_ARM', 90 'V8_TARGET_ARCH_ARM',
91 ], 91 ],
92 'conditions': [
93 [ 'arm_version==7 or arm_version=="default"', {
94 'defines': [
95 'CAN_USE_ARMV7_INSTRUCTIONS',
96 ],
97 }],
98 [ 'arm_fpu=="vfpv3-d16" or arm_fpu=="default"', {
99 'defines': [
100 'CAN_USE_VFP3_INSTRUCTIONS',
101 ],
102 }],
103 [ 'arm_fpu=="vfpv3"', {
104 'defines': [
105 'CAN_USE_VFP3_INSTRUCTIONS',
106 'CAN_USE_VFP32DREGS',
107 ],
108 }],
109 [ 'arm_fpu=="neon"', {
110 'defines': [
111 'CAN_USE_VFP3_INSTRUCTIONS',
112 'CAN_USE_VFP32DREGS',
113 'CAN_USE_NEON',
114 ],
115 }],
116 [ 'arm_test_noprobe=="on"', {
117 'defines': [
118 'ARM_TEST_NO_FEATURE_PROBE',
119 ],
120 }],
121 ],
92 'target_conditions': [ 122 'target_conditions': [
93 ['_toolset=="host"', { 123 ['_toolset=="host"', {
94 'variables': { 124 'variables': {
95 'armcompiler': '<!($(echo ${CXX_host:-$(which g++)}) -v 2>&1 | gre p -q "^Target: arm" && echo "yes" || echo "no")', 125 'armcompiler': '<!($(echo ${CXX_host:-$(which g++)}) -v 2>&1 | gre p -q "^Target: arm" && echo "yes" || echo "no")',
96 }, 126 },
97 'conditions': [ 127 'conditions': [
98 ['armcompiler=="yes"', { 128 ['armcompiler=="yes"', {
99 'conditions': [ 129 'conditions': [
100 [ 'arm_version==7', { 130 [ 'arm_version==7', {
101 'cflags': ['-march=armv7-a',], 131 'cflags': ['-march=armv7-a',],
102 }], 132 }],
103 [ 'arm_version==7 or arm_version=="default"', { 133 [ 'arm_version==7 or arm_version=="default"', {
104 'conditions': [ 134 'conditions': [
105 [ 'arm_fpu!="default"', { 135 [ 'arm_fpu!="default"', {
106 'cflags': ['-mfpu=<(arm_fpu)',], 136 'cflags': ['-mfpu=<(arm_fpu)',],
107 }], 137 }],
108 ], 138 ],
109 }], 139 }],
110 [ 'arm_float_abi!="default"', { 140 [ 'arm_float_abi!="default"', {
111 'cflags': ['-mfloat-abi=<(arm_float_abi)',], 141 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
112 }], 142 }],
113 [ 'arm_thumb==1', { 143 [ 'arm_thumb==1', {
114 'cflags': ['-mthumb',], 144 'cflags': ['-mthumb',],
115 }], 145 }],
116 [ 'arm_thumb==0', { 146 [ 'arm_thumb==0', {
117 'cflags': ['-marm',], 147 'cflags': ['-marm',],
118 }], 148 }],
119 [ 'arm_test=="on"', {
120 'defines': [
121 'ARM_TEST',
122 ],
123 }],
124 ], 149 ],
125 }, { 150 }, {
126 # armcompiler=="no" 151 # armcompiler=="no"
127 'conditions': [ 152 'conditions': [
128 [ 'arm_version==7 or arm_version=="default"', {
129 'defines': [
130 'CAN_USE_ARMV7_INSTRUCTIONS=1',
131 ],
132 'conditions': [
133 [ 'arm_fpu=="default"', {
134 'defines': [
135 'CAN_USE_VFP3_INSTRUCTIONS',
136 ],
137 }],
138 [ 'arm_fpu=="vfpv3-d16"', {
139 'defines': [
140 'CAN_USE_VFP3_INSTRUCTIONS',
141 ],
142 }],
143 [ 'arm_fpu=="vfpv3"', {
144 'defines': [
145 'CAN_USE_VFP3_INSTRUCTIONS',
146 'CAN_USE_VFP32DREGS',
147 ],
148 }],
149 [ 'arm_fpu=="neon"', {
150 'defines': [
151 'CAN_USE_VFP3_INSTRUCTIONS',
152 'CAN_USE_VFP32DREGS',
153 'CAN_USE_NEON',
154 ],
155 }],
156 ],
157 }],
158 [ 'arm_float_abi=="hard"', { 153 [ 'arm_float_abi=="hard"', {
159 'defines': [ 154 'defines': [
160 'USE_EABI_HARDFLOAT=1', 155 'USE_EABI_HARDFLOAT=1',
161 ], 156 ],
162 }], 157 }],
163 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', { 158 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
164 'defines': [ 159 'defines': [
165 'USE_EABI_HARDFLOAT=0', 160 'USE_EABI_HARDFLOAT=0',
166 ], 161 ],
167 }], 162 }],
168 ], 163 ],
169 'defines': [
170 'ARM_TEST',
171 ],
172 }], 164 }],
173 ], 165 ],
174 }], # _toolset=="host" 166 }], # _toolset=="host"
175 ['_toolset=="target"', { 167 ['_toolset=="target"', {
176 'variables': { 168 'variables': {
177 'armcompiler': '<!($(echo ${CXX_target:-<(CXX)}) -v 2>&1 | grep -q "^Target: arm" && echo "yes" || echo "no")', 169 'armcompiler': '<!($(echo ${CXX_target:-<(CXX)}) -v 2>&1 | grep -q "^Target: arm" && echo "yes" || echo "no")',
178 }, 170 },
179 'conditions': [ 171 'conditions': [
180 ['armcompiler=="yes"', { 172 ['armcompiler=="yes"', {
181 'conditions': [ 173 'conditions': [
182 [ 'arm_version==7', { 174 [ 'arm_version==7', {
183 'cflags': ['-march=armv7-a',], 175 'cflags': ['-march=armv7-a',],
184 }], 176 }],
185 [ 'arm_version==7 or arm_version=="default"', { 177 [ 'arm_version==7 or arm_version=="default"', {
186 'conditions': [ 178 'conditions': [
187 [ 'arm_fpu!="default"', { 179 [ 'arm_fpu!="default"', {
188 'cflags': ['-mfpu=<(arm_fpu)',], 180 'cflags': ['-mfpu=<(arm_fpu)',],
189 }], 181 }],
190 ], 182 ],
191 }], 183 }],
192 [ 'arm_float_abi!="default"', { 184 [ 'arm_float_abi!="default"', {
193 'cflags': ['-mfloat-abi=<(arm_float_abi)',], 185 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
194 }], 186 }],
195 [ 'arm_thumb==1', { 187 [ 'arm_thumb==1', {
196 'cflags': ['-mthumb',], 188 'cflags': ['-mthumb',],
197 }], 189 }],
198 [ 'arm_thumb==0', { 190 [ 'arm_thumb==0', {
199 'cflags': ['-marm',], 191 'cflags': ['-marm',],
200 }], 192 }],
201 [ 'arm_test=="on"', {
202 'defines': [
203 'ARM_TEST',
204 ],
205 'conditions': [
206 [ 'arm_fpu=="vfpv3-d16"', {
207 'defines': [
208 'CAN_USE_VFP3_INSTRUCTIONS',
209 ],
210 }],
211 [ 'arm_fpu=="vfpv3"', {
212 'defines': [
213 'CAN_USE_VFP3_INSTRUCTIONS',
214 'CAN_USE_VFP32DREGS',
215 ],
216 }],
217 [ 'arm_fpu=="neon"', {
218 'defines': [
219 'CAN_USE_VFP3_INSTRUCTIONS',
220 'CAN_USE_VFP32DREGS',
221 'CAN_USE_NEON',
222 ],
223 }],
224 ],
225 }],
226 ], 193 ],
227 }, { 194 }, {
228 # armcompiler=="no" 195 # armcompiler=="no"
229 'conditions': [ 196 'conditions': [
230 [ 'arm_version==7 or arm_version=="default"', {
231 'defines': [
232 'CAN_USE_ARMV7_INSTRUCTIONS=1',
233 ],
234 'conditions': [
235 [ 'arm_fpu=="default"', {
236 'defines': [
237 'CAN_USE_VFP3_INSTRUCTIONS',
238 'CAN_USE_VFP32DREGS',
239 'CAN_USE_NEON',
240 ],
241 }],
242 [ 'arm_fpu=="vfpv3-d16"', {
243 'defines': [
244 'CAN_USE_VFP3_INSTRUCTIONS',
245 ],
246 }],
247 [ 'arm_fpu=="vfpv3"', {
248 'defines': [
249 'CAN_USE_VFP3_INSTRUCTIONS',
250 'CAN_USE_VFP32DREGS',
251 ],
252 }],
253 [ 'arm_fpu=="neon"', {
254 'defines': [
255 'CAN_USE_VFP3_INSTRUCTIONS',
256 'CAN_USE_VFP32DREGS',
257 'CAN_USE_NEON',
258 ],
259 }],
260 ],
261 }],
262 [ 'arm_float_abi=="hard"', { 197 [ 'arm_float_abi=="hard"', {
263 'defines': [ 198 'defines': [
264 'USE_EABI_HARDFLOAT=1', 199 'USE_EABI_HARDFLOAT=1',
265 ], 200 ],
266 }], 201 }],
267 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', { 202 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
268 'defines': [ 203 'defines': [
269 'USE_EABI_HARDFLOAT=0', 204 'USE_EABI_HARDFLOAT=0',
270 ], 205 ],
271 }], 206 }],
272 ], 207 ],
273 'defines': [
274 'ARM_TEST',
275 ],
276 }], 208 }],
277 ], 209 ],
278 }], # _toolset=="target" 210 }], # _toolset=="target"
279 ], 211 ],
280 }], # v8_target_arch=="arm" 212 }], # v8_target_arch=="arm"
281 ['v8_target_arch=="arm64"', { 213 ['v8_target_arch=="arm64"', {
282 'defines': [ 214 'defines': [
283 'V8_TARGET_ARCH_ARM64', 215 'V8_TARGET_ARCH_ARM64',
284 ], 216 ],
285 }], 217 }],
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 'OptimizeReferences': '2', 739 'OptimizeReferences': '2',
808 'EnableCOMDATFolding': '2', 740 'EnableCOMDATFolding': '2',
809 }, 741 },
810 }, 742 },
811 }], # OS=="win" 743 }], # OS=="win"
812 ], # conditions 744 ], # conditions
813 }, # Release 745 }, # Release
814 }, # configurations 746 }, # configurations
815 }, # target_defaults 747 }, # target_defaults
816 } 748 }
OLDNEW
« no previous file with comments | « Makefile ('k') | src/arm/assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698