Commit 865ce580 authored by jochen@chromium.org's avatar jochen@chromium.org

Factor out toolset definitions in a separate gypi file

That way, third-party libraries use the correct toolset settings.

BUG=v8:2745
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c61c74d2
...@@ -210,9 +210,9 @@ ANDROID_ARCHES = android_ia32 android_arm android_mipsel ...@@ -210,9 +210,9 @@ ANDROID_ARCHES = android_ia32 android_arm android_mipsel
NACL_ARCHES = nacl_ia32 nacl_x64 NACL_ARCHES = nacl_ia32 nacl_x64
# List of files that trigger Makefile regeneration: # List of files that trigger Makefile regeneration:
GYPFILES = build/all.gyp build/common.gypi build/standalone.gypi \ GYPFILES = build/all.gyp build/features.gypi build/standalone.gypi \
preparser/preparser.gyp samples/samples.gyp src/d8.gyp \ build/toolchain.gypi preparser/preparser.gyp samples/samples.gyp \
test/cctest/cctest.gyp tools/gyp/v8.gyp src/d8.gyp test/cctest/cctest.gyp tools/gyp/v8.gyp
# If vtunejit=on, the v8vtune.gyp will be appended. # If vtunejit=on, the v8vtune.gyp will be appended.
ifeq ($(vtunejit), on) ifeq ($(vtunejit), on)
......
# Copyright 2013 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Compile time controlled V8 features.
{
'variables': {
'v8_compress_startup_data%': 'off',
'v8_enable_debugger_support%': 1,
'v8_enable_disassembler%': 0,
'v8_enable_gdbjit%': 0,
'v8_object_print%': 0,
'v8_enable_verify_heap%': 0,
'v8_use_snapshot%': 'true',
# With post mortem support enabled, metadata is embedded into libv8 that
# describes various parameters of the VM for use by debuggers. See
# tools/gen-postmortem-metadata.py for details.
'v8_postmortem_support%': 'false',
# Interpreted regexp engine exists as platform-independent alternative
# based where the regular expression is compiled to a bytecode.
'v8_interpreted_regexp%': 0,
# Enable ECMAScript Internationalization API. Enabling this feature will
# add a dependency on the ICU library.
'v8_enable_i18n_support%': 0,
},
'target_defaults': {
'conditions': [
['v8_enable_debugger_support==1', {
'defines': ['ENABLE_DEBUGGER_SUPPORT',],
}],
['v8_enable_disassembler==1', {
'defines': ['ENABLE_DISASSEMBLER',],
}],
['v8_enable_gdbjit==1', {
'defines': ['ENABLE_GDB_JIT_INTERFACE',],
}],
['v8_object_print==1', {
'defines': ['OBJECT_PRINT',],
}],
['v8_enable_verify_heap==1', {
'defines': ['VERIFY_HEAP',],
}],
['v8_interpreted_regexp==1', {
'defines': ['V8_INTERPRETED_REGEXP',],
}],
['v8_enable_i18n_support==1', {
'defines': ['V8_I18N_SUPPORT',],
}],
['v8_compress_startup_data=="bz2"', {
'defines': [
'COMPRESS_STARTUP_DATA_BZ2',
],
}],
], # conditions
'configurations': {
'Debug': {
'variables': {
'v8_enable_extra_checks%': 1,
},
'conditions': [
['v8_enable_extra_checks==1', {
'defines': ['ENABLE_EXTRA_CHECKS',],
}],
],
}, # Debug
'Release': {
'variables': {
'v8_enable_extra_checks%': 0,
},
'conditions': [
['v8_enable_extra_checks==1', {
'defines': ['ENABLE_EXTRA_CHECKS',],
}],
], # conditions
}, # Release
}, # configurations
}, # target_defaults
}
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
# Definitions to be used when building stand-alone V8 binaries. # Definitions to be used when building stand-alone V8 binaries.
{ {
# We need to include toolchain.gypi here for third-party sources that don't
# directly include it themselves.
'includes': ['toolchain.gypi'],
'variables': { 'variables': {
'component%': 'static_library', 'component%': 'static_library',
'clang%': 0, 'clang%': 0,
......
# Copyright 2012 the V8 project authors. All rights reserved. # Copyright 2013 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are # modification, are permitted provided that the following conditions are
# met: # met:
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
'msvs_use_common_release': 0, 'msvs_use_common_release': 0,
'gcc_version%': 'unknown', 'gcc_version%': 'unknown',
'CXX%': '${CXX:-$(which g++)}', # Used to assemble a shell command. 'CXX%': '${CXX:-$(which g++)}', # Used to assemble a shell command.
'v8_compress_startup_data%': 'off',
'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
...@@ -42,14 +41,6 @@ ...@@ -42,14 +41,6 @@
# NaCl V8 builds stop using the ARM simulator # NaCl V8 builds stop using the ARM simulator
'nacl_target_arch%': 'none', # must be set externally 'nacl_target_arch%': 'none', # must be set externally
# Setting 'v8_can_use_unaligned_accesses' to 'true' will allow the code
# generated by V8 to do unaligned memory access, and setting it to 'false'
# will ensure that the generated code will always do aligned memory
# accesses. The default value of 'default' will try to determine the correct
# setting. Note that for Intel architectures (ia32 and x64) unaligned memory
# access is allowed for all CPUs.
'v8_can_use_unaligned_accesses%': 'default',
# Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP # Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP
# registers d16-d31 in the generated code, both in the snapshot and for the # registers d16-d31 in the generated code, both in the snapshot and for the
# ARM target. Leaving the default value of 'false' will avoid the use of # ARM target. Leaving the default value of 'false' will avoid the use of
...@@ -67,21 +58,10 @@ ...@@ -67,21 +58,10 @@
# Default arch variant for MIPS. # Default arch variant for MIPS.
'mips_arch_variant%': 'mips32r2', 'mips_arch_variant%': 'mips32r2',
'v8_enable_debugger_support%': 1,
'v8_enable_backtrace%': 0, 'v8_enable_backtrace%': 0,
'v8_enable_disassembler%': 0,
'v8_enable_gdbjit%': 0,
'v8_object_print%': 0,
# Enable profiling support. Only required on Windows. # Enable profiling support. Only required on Windows.
'v8_enable_prof%': 0, 'v8_enable_prof%': 0,
'v8_enable_verify_heap%': 0,
# Some versions of GCC 4.5 seem to need -fno-strict-aliasing. # Some versions of GCC 4.5 seem to need -fno-strict-aliasing.
'v8_no_strict_aliasing%': 0, 'v8_no_strict_aliasing%': 0,
...@@ -89,49 +69,13 @@ ...@@ -89,49 +69,13 @@
# it's handled in build/standalone.gypi. # it's handled in build/standalone.gypi.
'want_separate_host_toolset%': 1, 'want_separate_host_toolset%': 1,
'v8_use_snapshot%': 'true',
'host_os%': '<(OS)', 'host_os%': '<(OS)',
'werror%': '-Werror', 'werror%': '-Werror',
# With post mortem support enabled, metadata is embedded into libv8 that
# describes various parameters of the VM for use by debuggers. See
# tools/gen-postmortem-metadata.py for details.
'v8_postmortem_support%': 'false',
# For a shared library build, results in "libv8-<(soname_version).so". # For a shared library build, results in "libv8-<(soname_version).so".
'soname_version%': '', 'soname_version%': '',
# Interpreted regexp engine exists as platform-independent alternative
# based where the regular expression is compiled to a bytecode.
'v8_interpreted_regexp%': 0,
# Enable ECMAScript Internationalization API. Enabling this feature will
# add a dependency on the ICU library.
'v8_enable_i18n_support%': 0,
}, },
'target_defaults': { 'target_defaults': {
'conditions': [ 'conditions': [
['v8_enable_debugger_support==1', {
'defines': ['ENABLE_DEBUGGER_SUPPORT',],
}],
['v8_enable_disassembler==1', {
'defines': ['ENABLE_DISASSEMBLER',],
}],
['v8_enable_gdbjit==1', {
'defines': ['ENABLE_GDB_JIT_INTERFACE',],
}],
['v8_object_print==1', {
'defines': ['OBJECT_PRINT',],
}],
['v8_enable_verify_heap==1', {
'defines': ['VERIFY_HEAP',],
}],
['v8_interpreted_regexp==1', {
'defines': ['V8_INTERPRETED_REGEXP',],
}],
['v8_enable_i18n_support==1', {
'defines': ['V8_I18N_SUPPORT',],
}],
['v8_target_arch=="arm"', { ['v8_target_arch=="arm"', {
'defines': [ 'defines': [
'V8_TARGET_ARCH_ARM', 'V8_TARGET_ARCH_ARM',
...@@ -391,11 +335,6 @@ ...@@ -391,11 +335,6 @@
}, },
'msvs_configuration_platform': 'x64', 'msvs_configuration_platform': 'x64',
}], # v8_target_arch=="x64" }], # v8_target_arch=="x64"
['v8_compress_startup_data=="bz2"', {
'defines': [
'COMPRESS_STARTUP_DATA_BZ2',
],
}],
['OS=="win"', { ['OS=="win"', {
'defines': [ 'defines': [
'WIN32', 'WIN32',
...@@ -488,9 +427,6 @@ ...@@ -488,9 +427,6 @@
], # conditions ], # conditions
'configurations': { 'configurations': {
'Debug': { 'Debug': {
'variables': {
'v8_enable_extra_checks%': 1,
},
'defines': [ 'defines': [
'DEBUG', 'DEBUG',
'ENABLE_DISASSEMBLER', 'ENABLE_DISASSEMBLER',
...@@ -515,9 +451,6 @@ ...@@ -515,9 +451,6 @@
}, },
}, },
'conditions': [ 'conditions': [
['v8_enable_extra_checks==1', {
'defines': ['ENABLE_EXTRA_CHECKS',],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter', 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
'-Wnon-virtual-dtor', '-Woverloaded-virtual' ], '-Wnon-virtual-dtor', '-Woverloaded-virtual' ],
...@@ -548,13 +481,7 @@ ...@@ -548,13 +481,7 @@
], ],
}, # Debug }, # Debug
'Release': { 'Release': {
'variables': {
'v8_enable_extra_checks%': 0,
},
'conditions': [ 'conditions': [
['v8_enable_extra_checks==1', {
'defines': ['ENABLE_EXTRA_CHECKS',],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
'cflags!': [ 'cflags!': [
'-O2', '-O2',
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
'variables': { 'variables': {
'v8_code': 1, 'v8_code': 1,
}, },
'includes': ['../build/common.gypi'], 'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'targets': [ 'targets': [
{ {
'target_name': 'preparser', 'target_name': 'preparser',
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
'variables': { 'variables': {
'v8_code': 1, 'v8_code': 1,
}, },
'includes': ['../build/common.gypi'], 'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'target_defaults': { 'target_defaults': {
'type': 'executable', 'type': 'executable',
'dependencies': [ 'dependencies': [
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
'v8_enable_vtunejit%': 0, 'v8_enable_vtunejit%': 0,
'v8_enable_i18n_support%': 0, 'v8_enable_i18n_support%': 0,
}, },
'includes': ['../build/common.gypi'], 'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'targets': [ 'targets': [
{ {
'target_name': 'd8', 'target_name': 'd8',
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
'variables': { 'variables': {
'v8_code': 1, 'v8_code': 1,
}, },
'includes': ['../../../build/common.gypi'], 'includes': ['../../../build/toolchain.gypi', '../../../build/features.gypi'],
'targets': [ 'targets': [
{ {
'target_name': 'v8_vtune', 'target_name': 'v8_vtune',
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
'v8_code': 1, 'v8_code': 1,
'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc', 'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
}, },
'includes': ['../../build/common.gypi'], 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'targets': [ 'targets': [
{ {
'target_name': 'cctest', 'target_name': 'cctest',
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
'variables': { 'variables': {
'v8_code': 1, 'v8_code': 1,
}, },
'includes': ['../../build/common.gypi'], 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'targets': [ 'targets': [
{ {
'target_name': 'v8', 'target_name': 'v8',
......
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