Commit c9087a71 authored by rmcilroy@chromium.org's avatar rmcilroy@chromium.org

Revert "Remove erroneous uses of CXX / CXX_target / CXX_host from gyp."

This reverts commit r22425 for breaking the Arm debug builder.

BUG=384474
TBR=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/393273002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 96dd1c78
...@@ -265,8 +265,15 @@ ...@@ -265,8 +265,15 @@
}], # _toolset=="target" }], # _toolset=="target"
# Settings for building host targets using the system toolchain. # Settings for building host targets using the system toolchain.
['_toolset=="host"', { ['_toolset=="host"', {
'cflags': [ '-pthread' ], 'conditions': [
'ldflags': [ '-pthread' ], ['target_arch=="x64"', {
'cflags': [ '-m64', '-pthread' ],
'ldflags': [ '-m64', '-pthread' ],
}, {
'cflags': [ '-m32', '-pthread' ],
'ldflags': [ '-m32', '-pthread' ],
}],
],
'ldflags!': [ 'ldflags!': [
'-Wl,-z,noexecstack', '-Wl,-z,noexecstack',
'-Wl,--gc-sections', '-Wl,--gc-sections',
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
'variables': { 'variables': {
'msvs_use_common_release': 0, 'msvs_use_common_release': 0,
'gcc_version%': 'unknown', 'gcc_version%': 'unknown',
'clang%': 0, 'CXX%': '${CXX:-$(which g++)}', # Used to assemble a shell command.
'v8_target_arch%': '<(target_arch)', 'v8_target_arch%': '<(target_arch)',
# Native Client builds currently use the V8 ARM JIT and # Native Client builds currently use the V8 ARM JIT and
# arm/simulator-arm.cc to defer the significant effort required # arm/simulator-arm.cc to defer the significant effort required
...@@ -83,27 +83,6 @@ ...@@ -83,27 +83,6 @@
# Allow to suppress the array bounds warning (default is no suppression). # Allow to suppress the array bounds warning (default is no suppression).
'wno_array_bounds%': '', 'wno_array_bounds%': '',
}, },
'conditions': [
['host_arch=="ia32" or host_arch=="x64" or clang==1', {
'variables': {
'host_cxx_is_biarch%': 1,
},
}, {
'variables': {
'host_cxx_is_biarch%': 0,
},
}],
['target_arch=="ia32" or target_arch=="x64" or target_arch=="x87" or \
clang==1', {
'variables': {
'target_cxx_is_biarch%': 1,
},
}, {
'variables': {
'target_cxx_is_biarch%': 0,
},
}],
],
'target_defaults': { 'target_defaults': {
'conditions': [ 'conditions': [
['v8_target_arch=="arm"', { ['v8_target_arch=="arm"', {
...@@ -142,9 +121,11 @@ ...@@ -142,9 +121,11 @@
], ],
'target_conditions': [ 'target_conditions': [
['_toolset=="host"', { ['_toolset=="host"', {
'variables': {
'armcompiler': '<!($(echo ${CXX_host:-$(which g++)}) -v 2>&1 | grep -q "^Target: arm" && echo "yes" || echo "no")',
},
'conditions': [ 'conditions': [
['v8_target_arch==host_arch', { ['armcompiler=="yes"', {
# Host built with an Arm CXX compiler.
'conditions': [ 'conditions': [
[ 'arm_version==7', { [ 'arm_version==7', {
'cflags': ['-march=armv7-a',], 'cflags': ['-march=armv7-a',],
...@@ -167,8 +148,7 @@ ...@@ -167,8 +148,7 @@
}], }],
], ],
}, { }, {
# 'v8_target_arch!=host_arch' # armcompiler=="no"
# Host not built with an Arm CXX compiler (simulator build).
'conditions': [ 'conditions': [
[ 'arm_float_abi=="hard"', { [ 'arm_float_abi=="hard"', {
'defines': [ 'defines': [
...@@ -185,9 +165,11 @@ ...@@ -185,9 +165,11 @@
], ],
}], # _toolset=="host" }], # _toolset=="host"
['_toolset=="target"', { ['_toolset=="target"', {
'variables': {
'armcompiler': '<!($(echo ${CXX_target:-<(CXX)}) -v 2>&1 | grep -q "^Target: arm" && echo "yes" || echo "no")',
},
'conditions': [ 'conditions': [
['v8_target_arch==target_arch', { ['armcompiler=="yes"', {
# Target built with an Arm CXX compiler.
'conditions': [ 'conditions': [
[ 'arm_version==7', { [ 'arm_version==7', {
'cflags': ['-march=armv7-a',], 'cflags': ['-march=armv7-a',],
...@@ -210,8 +192,7 @@ ...@@ -210,8 +192,7 @@
}], }],
], ],
}, { }, {
# 'v8_target_arch!=target_arch' # armcompiler=="no"
# Target not built with an Arm CXX compiler (simulator build).
'conditions': [ 'conditions': [
[ 'arm_float_abi=="hard"', { [ 'arm_float_abi=="hard"', {
'defines': [ 'defines': [
...@@ -249,9 +230,11 @@ ...@@ -249,9 +230,11 @@
'defines': [ 'defines': [
'V8_TARGET_ARCH_MIPS', 'V8_TARGET_ARCH_MIPS',
], ],
'variables': {
'mipscompiler': '<!($(echo <(CXX)) -v 2>&1 | grep -q "^Target: mips" && echo "yes" || echo "no")',
},
'conditions': [ 'conditions': [
['v8_target_arch==target_arch', { ['mipscompiler=="yes"', {
# Target built with a Mips CXX compiler.
'target_conditions': [ 'target_conditions': [
['_toolset=="target"', { ['_toolset=="target"', {
'cflags': ['-EB'], 'cflags': ['-EB'],
...@@ -298,9 +281,11 @@ ...@@ -298,9 +281,11 @@
'defines': [ 'defines': [
'V8_TARGET_ARCH_MIPS', 'V8_TARGET_ARCH_MIPS',
], ],
'variables': {
'mipscompiler': '<!($(echo <(CXX)) -v 2>&1 | grep -q "^Target: mips" && echo "yes" || echo "no")',
},
'conditions': [ 'conditions': [
['v8_target_arch==target_arch', { ['mipscompiler=="yes"', {
# Target built with a Mips CXX compiler.
'target_conditions': [ 'target_conditions': [
['_toolset=="target"', { ['_toolset=="target"', {
'cflags': ['-EL'], 'cflags': ['-EL'],
...@@ -353,9 +338,11 @@ ...@@ -353,9 +338,11 @@
'defines': [ 'defines': [
'V8_TARGET_ARCH_MIPS64', 'V8_TARGET_ARCH_MIPS64',
], ],
'variables': {
'mipscompiler': '<!($(echo <(CXX)) -v 2>&1 | grep -q "^Target: mips" && echo "yes" || echo "no")',
},
'conditions': [ 'conditions': [
['v8_target_arch==target_arch', { ['mipscompiler=="yes"', {
# Target built with a Mips CXX compiler.
'target_conditions': [ 'target_conditions': [
['_toolset=="target"', { ['_toolset=="target"', {
'cflags': ['-EL'], 'cflags': ['-EL'],
...@@ -452,28 +439,44 @@ ...@@ -452,28 +439,44 @@
}, },
}, },
}], }],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
or OS=="netbsd" or OS=="qnx"', {
'conditions': [
[ 'v8_no_strict_aliasing==1', {
'cflags': [ '-fno-strict-aliasing' ],
}],
], # conditions
}],
['OS=="solaris"', {
'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
}],
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \ or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
(v8_target_arch=="arm" or v8_target_arch=="ia32" or \ (v8_target_arch=="arm" or v8_target_arch=="ia32" or v8_target_arch=="x87" or\
v8_target_arch=="x87" or v8_target_arch=="mips" or \ v8_target_arch=="mips" or v8_target_arch=="mipsel")', {
v8_target_arch=="mipsel")', { # Check whether the host compiler and target compiler support the
# '-m32' option and set it if so.
'target_conditions': [ 'target_conditions': [
['_toolset=="host"', { ['_toolset=="host"', {
'conditions': [ 'variables': {
['host_cxx_is_biarch==1', { 'm32flag': '<!(($(echo ${CXX_host:-$(which g++)}) -m32 -E - > /dev/null 2>&1 < /dev/null) && echo "-m32" || true)',
'cflags': [ '-m32' ], },
'ldflags': [ '-m32' ] 'cflags': [ '<(m32flag)' ],
}], 'ldflags': [ '<(m32flag)' ],
],
'xcode_settings': { 'xcode_settings': {
'ARCHS': [ 'i386' ], 'ARCHS': [ 'i386' ],
}, },
}], }],
['_toolset=="target"', { ['_toolset=="target"', {
'variables': {
'm32flag': '<!(($(echo ${CXX_target:-<(CXX)}) -m32 -E - > /dev/null 2>&1 < /dev/null) && echo "-m32" || true)',
'clang%': 0,
},
'conditions': [ 'conditions': [
['target_cxx_is_biarch==1 and nacl_target_arch!="nacl_x64"', { ['((OS!="android" and OS!="qnx") or clang==1) and \
'cflags': [ '-m32' ], nacl_target_arch!="nacl_x64"', {
'ldflags': [ '-m32' ], 'cflags': [ '<(m32flag)' ],
'ldflags': [ '<(m32flag)' ],
}], }],
], ],
'xcode_settings': { 'xcode_settings': {
...@@ -484,35 +487,28 @@ ...@@ -484,35 +487,28 @@
}], }],
['(OS=="linux" or OS=="android") and \ ['(OS=="linux" or OS=="android") and \
(v8_target_arch=="x64" or v8_target_arch=="arm64")', { (v8_target_arch=="x64" or v8_target_arch=="arm64")', {
# Check whether the host compiler and target compiler support the
# '-m64' option and set it if so.
'target_conditions': [ 'target_conditions': [
['_toolset=="host"', { ['_toolset=="host"', {
'conditions': [ 'variables': {
['host_cxx_is_biarch==1', { 'm64flag': '<!(($(echo ${CXX_host:-$(which g++)}) -m64 -E - > /dev/null 2>&1 < /dev/null) && echo "-m64" || true)',
'cflags': [ '-m64' ], },
'ldflags': [ '-m64' ] 'cflags': [ '<(m64flag)' ],
}], 'ldflags': [ '<(m64flag)' ],
],
}], }],
['_toolset=="target"', { ['_toolset=="target"', {
'variables': {
'm64flag': '<!(($(echo ${CXX_target:-<(CXX)}) -m64 -E - > /dev/null 2>&1 < /dev/null) && echo "-m64" || true)',
},
'conditions': [ 'conditions': [
['target_cxx_is_biarch==1', { ['((OS!="android" and OS!="qnx") or clang==1)', {
'cflags': [ '-m64' ], 'cflags': [ '<(m64flag)' ],
'ldflags': [ '-m64' ], 'ldflags': [ '<(m64flag)' ],
}],
]
}], }],
], ],
}], }]
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ ],
or OS=="netbsd" or OS=="qnx"', {
'conditions': [
[ 'v8_no_strict_aliasing==1', {
'cflags': [ '-fno-strict-aliasing' ],
}],
], # conditions
}],
['OS=="solaris"', {
'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
}], }],
['OS=="freebsd" or OS=="openbsd"', { ['OS=="freebsd" or OS=="openbsd"', {
'cflags': [ '-I/usr/local/include' ], 'cflags': [ '-I/usr/local/include' ],
......
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