@@ -322,6 +322,23 @@ def compiler_version():
322
322
return (version , is_clang )
323
323
324
324
325
+ def configure_arm (o ):
326
+ # V8 on ARM requires that armv7 is set. CPU Model detected by
327
+ # the presence of __ARM_ARCH_7__ and the like defines in compiler
328
+ if options .arm_float_abi :
329
+ hard_float = options .arm_float_abi == 'hard'
330
+ else :
331
+ hard_float = arm_hard_float_abi ()
332
+ o ['variables' ]['v8_use_arm_eabi_hardfloat' ] = b (hard_float )
333
+
334
+ armv7 = is_arch_armv7 ()
335
+ if armv7 :
336
+ # CHECKME VFPv3 implies ARMv7+ but is the reverse true as well?
337
+ o ['variables' ]['arm_fpu' ] = 'vfpv3'
338
+ o ['variables' ]['arm_neon' ] = 0
339
+ o ['variables' ]['armv7' ] = int (armv7 )
340
+
341
+
325
342
def configure_node (o ):
326
343
# TODO add gdb
327
344
o ['variables' ]['v8_no_strict_aliasing' ] = 1 # work around compiler bugs
@@ -334,15 +351,8 @@ def configure_node(o):
334
351
o ['variables' ]['host_arch' ] = host_arch
335
352
o ['variables' ]['target_arch' ] = target_arch
336
353
337
- # V8 on ARM requires that armv7 is set. CPU Model detected by
338
- # the presence of __ARM_ARCH_7__ and the like defines in compiler
339
354
if target_arch == 'arm' :
340
- if options .arm_float_abi :
341
- hard_float = options .arm_float_abi == 'hard'
342
- else :
343
- hard_float = arm_hard_float_abi ()
344
- o ['variables' ]['v8_use_arm_eabi_hardfloat' ] = b (hard_float )
345
- o ['variables' ]['armv7' ] = 1 if is_arch_armv7 () else 0
355
+ configure_arm (o )
346
356
347
357
cc_version , is_clang = compiler_version ()
348
358
o ['variables' ]['clang' ] = 1 if is_clang else 0
0 commit comments