diff --git a/Makefile b/Makefile index d2c9a9dfac..b5882c64d3 100644 --- a/Makefile +++ b/Makefile @@ -138,12 +138,17 @@ ifeq ($(deprecationwarnings), on) GYPFLAGS += -Dv8_deprecation_warnings=1 endif # arm specific flags. -# armv7=false/true +# arm_version= +ifneq ($(strip $(arm_version)),) + GYPFLAGS += -Darm_version=$(arm_version) +else +# Deprecated (use arm_version instead): armv7=false/true ifeq ($(armv7), false) - GYPFLAGS += -Darmv7=0 + GYPFLAGS += -Darm_version=6 else ifeq ($(armv7), true) - GYPFLAGS += -Darmv7=1 + GYPFLAGS += -Darm_version=7 +endif endif endif # vfp2=off. Deprecated, use armfpu= diff --git a/build/android.gypi b/build/android.gypi index ca097255bb..0ea899d6ed 100644 --- a/build/android.gypi +++ b/build/android.gypi @@ -146,7 +146,7 @@ '-Wl,--icf=safe', ], }], - ['target_arch=="arm" and armv7==1', { + ['target_arch=="arm" and arm_version==7', { 'cflags': [ '-march=armv7-a', '-mtune=cortex-a8', @@ -164,12 +164,12 @@ '-I<(android_stlport_include)', ], 'conditions': [ - ['target_arch=="arm" and armv7==1', { + ['target_arch=="arm" and arm_version==7', { 'ldflags': [ '-L<(android_stlport_libs)/armeabi-v7a', ], }], - ['target_arch=="arm" and armv7==0', { + ['target_arch=="arm" and arm_version < 7', { 'ldflags': [ '-L<(android_stlport_libs)/armeabi', ], diff --git a/build/standalone.gypi b/build/standalone.gypi index 1f91f9eb25..cf45ee903e 100644 --- a/build/standalone.gypi +++ b/build/standalone.gypi @@ -117,7 +117,7 @@ }], ], # Default ARM variable settings. - 'armv7%': 'default', + 'arm_version%': 'default', 'arm_neon%': 0, 'arm_fpu%': 'vfpv3', 'arm_float_abi%': 'default', diff --git a/build/toolchain.gypi b/build/toolchain.gypi index 99f357a965..684db74d2b 100644 --- a/build/toolchain.gypi +++ b/build/toolchain.gypi @@ -92,10 +92,10 @@ 'conditions': [ ['armcompiler=="yes"', { 'conditions': [ - [ 'armv7==1', { + [ 'arm_version==7', { 'cflags': ['-march=armv7-a',], }], - [ 'armv7==1 or armv7=="default"', { + [ 'arm_version==7 or arm_version=="default"', { 'conditions': [ [ 'arm_neon==1', { 'cflags': ['-mfpu=neon',], @@ -127,7 +127,7 @@ }, { # armcompiler=="no" 'conditions': [ - [ 'armv7==1 or armv7=="default"', { + [ 'arm_version==7 or arm_version=="default"', { 'defines': [ 'CAN_USE_ARMV7_INSTRUCTIONS=1', ], @@ -180,10 +180,10 @@ 'conditions': [ ['armcompiler=="yes"', { 'conditions': [ - [ 'armv7==1', { + [ 'arm_version==7', { 'cflags': ['-march=armv7-a',], }], - [ 'armv7==1 or armv7=="default"', { + [ 'arm_version==7 or arm_version=="default"', { 'conditions': [ [ 'arm_neon==1', { 'cflags': ['-mfpu=neon',], @@ -215,7 +215,7 @@ }, { # armcompiler=="no" 'conditions': [ - [ 'armv7==1 or armv7=="default"', { + [ 'arm_version==7 or arm_version=="default"', { 'defines': [ 'CAN_USE_ARMV7_INSTRUCTIONS=1', ],