Commit 3bf44848 authored by machenbach's avatar machenbach Committed by Commit bot

[gn] Move build to gypfiles

This prepares for pulling chromium's build as dependency for
gn. After this, the files in build and gypfiles need to stay
in sync until chromium is updated.

BUG=chromium:474921
LOG=n

Review-Url: https://codereview.chromium.org/1848553003
Cr-Commit-Position: refs/heads/master@{#35898}
parent ee03b721
......@@ -41,10 +41,7 @@ shell
shell_g
/_*
/base
/build/Debug
/build/ipch
/build/Release
/build/win_toolchain.json
/gypfiles/win_toolchain.json
/buildtools
/hydrogen.cfg
/obj
......
......@@ -7,6 +7,10 @@ vars = {
}
deps = {
# TODO(machenbach): Add this. Need to be committed locally as trybots run
# gclient sync on a deps change before applying any other change.
# "v8/build":
# Var("git_url") + "/chromium/src/build.git" + "@" + "7181610b0c84e2cd87852a7f7d30c4e7e4ca32cd",
"v8/tools/gyp":
Var("git_url") + "/external/gyp.git" + "@" + "e24c83726b7294179f479a683eeb351568fcc4ee",
"v8/third_party/icu":
......@@ -53,6 +57,7 @@ include_rules = [
# checkdeps.py shouldn't check for includes in these directories:
skip_child_includes = [
"build",
"gypfiles",
"third_party",
]
......@@ -65,7 +70,7 @@ hooks = [
'pattern': '.',
'action': [
'python',
'v8/build/landmines.py',
'v8/gypfiles/landmines.py',
],
},
# Pull clang-format binaries using checked-in hashes.
......@@ -190,7 +195,7 @@ hooks = [
# Update the Windows toolchain if necessary.
'name': 'win_toolchain',
'pattern': '.',
'action': ['python', 'v8/build/vs_toolchain.py', 'update'],
'action': ['python', 'v8/gypfiles/vs_toolchain.py', 'update'],
},
# Pull binutils for linux, enabled debug fission for faster linking /
# debugging when used with clang on Ubuntu Precise.
......@@ -208,7 +213,7 @@ hooks = [
# Note: This must run before the clang update.
'name': 'gold_plugin',
'pattern': '.',
'action': ['python', 'v8/build/download_gold_plugin.py'],
'action': ['python', 'v8/gypfiles/download_gold_plugin.py'],
},
{
# Pull clang if needed or requested via GYP_DEFINES.
......@@ -220,6 +225,6 @@ hooks = [
{
# A change to a .gyp, .gypi, or to GYP itself should run the generator.
"pattern": ".",
"action": ["python", "v8/build/gyp_v8"],
"action": ["python", "v8/gypfiles/gyp_v8"],
},
]
......@@ -261,8 +261,9 @@ NACL_ARCHES = nacl_ia32 nacl_x64
# List of files that trigger Makefile regeneration:
GYPFILES = third_party/icu/icu.gypi third_party/icu/icu.gyp \
build/shim_headers.gypi build/features.gypi build/standalone.gypi \
build/toolchain.gypi build/all.gyp build/mac/asan.gyp \
gypfiles/shim_headers.gypi gypfiles/features.gypi \
gypfiles/standalone.gypi \
gypfiles/toolchain.gypi gypfiles/all.gyp gypfiles/mac/asan.gyp \
test/cctest/cctest.gyp test/fuzzer/fuzzer.gyp \
test/unittests/unittests.gyp src/v8.gyp \
tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \
......@@ -449,8 +450,8 @@ $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
$(eval V8_TARGET_ARCH:=$(subst .,,$(suffix $(basename $@))))
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/tools/gyp/pylib:$(PYTHONPATH)" \
GYP_GENERATORS=make \
tools/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
tools/gyp/gyp --generator-output="$(OUTDIR)" gypfiles/all.gyp \
-Igypfiles/standalone.gypi --depth=. \
-Dv8_target_arch=$(V8_TARGET_ARCH) \
$(if $(findstring $(CXX_TARGET_ARCH),$(V8_TARGET_ARCH)), \
-Dtarget_arch=$(V8_TARGET_ARCH),) \
......@@ -460,8 +461,8 @@ $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH):$(shell pwd)/tools/gyp/pylib:$(PYTHONPATH)" \
GYP_GENERATORS=make \
tools/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
tools/gyp/gyp --generator-output="$(OUTDIR)" gypfiles/all.gyp \
-Igypfiles/standalone.gypi --depth=. -S.native $(GYPFLAGS)
# Note that NACL_SDK_ROOT must be set to point to an appropriate
# Native Client SDK before using this makefile. You can download
......
......@@ -77,6 +77,6 @@ $(ANDROID_MAKEFILES):
GYP_GENERATORS=make-android \
GYP_DEFINES="${DEFINES}" \
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH)" \
tools/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
tools/gyp/gyp --generator-output="${OUTDIR}" gypfiles/all.gyp \
-Igypfiles/standalone.gypi --depth=. \
-S$(suffix $(basename $@))$(suffix $@) ${GYPFLAGS}
......@@ -91,7 +91,7 @@ $(NACL_MAKEFILES):
CXX=${NACL_CXX} \
LINK=${NACL_LINK} \
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH)" \
tools/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
tools/gyp/gyp --generator-output="${OUTDIR}" gypfiles/all.gyp \
-Igypfiles/standalone.gypi --depth=. \
-S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) \
-Dwno_array_bounds=-Wno-array-bounds
set noparent
jkummerow@chromium.org
jochen@chromium.org
machenbach@chromium.org
set noparent
jkummerow@chromium.org
jochen@chromium.org
machenbach@chromium.org
# 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_enable_disassembler%': 0,
'v8_enable_gdbjit%': 0,
'v8_object_print%': 0,
'v8_enable_verify_heap%': 0,
'v8_trace_maps%': 0,
# Enable the snapshot feature, for fast context creation.
# http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
'v8_use_snapshot%': 'true',
'v8_enable_verify_predictable%': 0,
# 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%': 1,
# Enable compiler warnings when using V8_DEPRECATED apis.
'v8_deprecation_warnings%': 0,
# Enable compiler warnings when using V8_DEPRECATE_SOON apis.
'v8_imminent_deprecation_warnings%': 0,
# Set to 1 to enable DCHECKs in release builds.
'dcheck_always_on%': 0,
# Enable/disable JavaScript API accessors.
'v8_js_accessors%': 0,
},
'target_defaults': {
'conditions': [
['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_trace_maps==1', {
'defines': ['TRACE_MAPS',],
}],
['v8_enable_verify_predictable==1', {
'defines': ['VERIFY_PREDICTABLE',],
}],
['v8_interpreted_regexp==1', {
'defines': ['V8_INTERPRETED_REGEXP',],
}],
['v8_deprecation_warnings==1', {
'defines': ['V8_DEPRECATION_WARNINGS',],
}],
['v8_imminent_deprecation_warnings==1', {
'defines': ['V8_IMMINENT_DEPRECATION_WARNINGS',],
}],
['v8_enable_i18n_support==1', {
'defines': ['V8_I18N_SUPPORT',],
}],
['v8_use_snapshot=="true" and v8_use_external_startup_data==1', {
'defines': ['V8_USE_EXTERNAL_STARTUP_DATA',],
}],
['dcheck_always_on!=0', {
'defines': ['DEBUG',],
}],
], # conditions
'configurations': {
'DebugBaseCommon': {
'abstract': 1,
'variables': {
'v8_enable_handle_zapping%': 1,
},
'conditions': [
['v8_enable_handle_zapping==1', {
'defines': ['ENABLE_HANDLE_ZAPPING',],
}],
],
}, # Debug
'Release': {
'variables': {
'v8_enable_handle_zapping%': 1,
},
'conditions': [
['v8_enable_handle_zapping==1', {
'defines': ['ENABLE_HANDLE_ZAPPING',],
}],
], # conditions
}, # Release
}, # configurations
}, # target_defaults
}
......@@ -90,7 +90,7 @@ def additional_include_files(args=[]):
result.append(path)
# Always include standalone.gypi
AddInclude(os.path.join(v8_root, 'build', 'standalone.gypi'))
AddInclude(os.path.join(v8_root, 'gypfiles', 'standalone.gypi'))
# Optionally add supplemental .gypi files if present.
supplements = glob.glob(os.path.join(v8_root, '*', 'supplement.gypi'))
......
......@@ -17,7 +17,7 @@
# 'foo_test',
# ],
# 'includes': [
# '../build/isolate.gypi',
# '../gypfiles/isolate.gypi',
# ],
# 'sources': [
# 'foo_test.isolate',
......
......@@ -198,7 +198,7 @@ def process_options():
parser = optparse.OptionParser()
parser.add_option(
'-s', '--landmine-scripts', action='append',
default=[os.path.join(SRC_DIR, 'build', 'get_landmines.py')],
default=[os.path.join(SRC_DIR, 'gypfiles', 'get_landmines.py')],
help='Path to the script which emits landmines to stdout. The target '
'is passed to this script via option -t. Note that an extra '
'script can be specified via an env var EXTRA_LANDMINES_SCRIPT.')
......
# 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.
# This file is meant to be included into a target to handle shim headers
# in a consistent manner. To use this the following variables need to be
# defined:
# headers_root_path: string: path to directory containing headers
# header_filenames: list: list of header file names
{
'variables': {
'shim_headers_path': '<(SHARED_INTERMEDIATE_DIR)/shim_headers/<(_target_name)/<(_toolset)',
'shim_generator_additional_args%': [],
},
'include_dirs++': [
'<(shim_headers_path)',
],
'all_dependent_settings': {
'include_dirs+++': [
'<(shim_headers_path)',
],
},
'actions': [
{
'variables': {
'generator_path': '<(DEPTH)/tools/generate_shim_headers/generate_shim_headers.py',
'generator_args': [
'--headers-root', '<(headers_root_path)',
'--output-directory', '<(shim_headers_path)',
'<@(shim_generator_additional_args)',
'<@(header_filenames)',
],
},
'action_name': 'generate_<(_target_name)_shim_headers',
'inputs': [
'<(generator_path)',
],
'outputs': [
'<!@pymod_do_main(generate_shim_headers <@(generator_args) --outputs)',
],
'action': ['python',
'<(generator_path)',
'<@(generator_args)',
'--generate',
],
'message': 'Generating <(_target_name) shim headers.',
},
],
}
......@@ -677,7 +677,7 @@
],
},
'dependencies': [
'<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
'<(DEPTH)/gypfiles/mac/asan.gyp:asan_dynamic_runtime',
],
'target_conditions': [
['_type!="static_library"', {
......@@ -1327,10 +1327,10 @@
['coverage==1', {
# Wrap goma with coverage wrapper.
'make_global_settings': [
['CC_wrapper', '<(base_dir)/build/coverage_wrapper.py <(gomadir)/gomacc'],
['CXX_wrapper', '<(base_dir)/build/coverage_wrapper.py <(gomadir)/gomacc'],
['CC.host_wrapper', '<(base_dir)/build/coverage_wrapper.py <(gomadir)/gomacc'],
['CXX.host_wrapper', '<(base_dir)/build/coverage_wrapper.py <(gomadir)/gomacc'],
['CC_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py <(gomadir)/gomacc'],
['CXX_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py <(gomadir)/gomacc'],
['CC.host_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py <(gomadir)/gomacc'],
['CXX.host_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py <(gomadir)/gomacc'],
],
}, {
# Use only goma wrapper.
......@@ -1347,10 +1347,10 @@
['coverage==1', {
# Use only coverage wrapper.
'make_global_settings': [
['CC_wrapper', '<(base_dir)/build/coverage_wrapper.py'],
['CXX_wrapper', '<(base_dir)/build/coverage_wrapper.py'],
['CC.host_wrapper', '<(base_dir)/build/coverage_wrapper.py'],
['CXX.host_wrapper', '<(base_dir)/build/coverage_wrapper.py'],
['CC_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py'],
['CXX_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py'],
['CC.host_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py'],
['CXX.host_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py'],
],
}],
],
......
# 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.
# Shared definitions for all V8-related targets.
{
'variables': {
'msvs_use_common_release': 0,
'clang%': 0,
'asan%': 0,
'lsan%': 0,
'msan%': 0,
'tsan%': 0,
'ubsan%': 0,
'ubsan_vptr%': 0,
'v8_target_arch%': '<(target_arch)',
'v8_host_byteorder%': '<!(python -c "import sys; print sys.byteorder")',
# Native Client builds currently use the V8 ARM JIT and
# arm/simulator-arm.cc to defer the significant effort required
# for NaCl JIT support. The nacl_target_arch variable provides
# the 'true' target arch for places in this file that need it.
# TODO(bradchen): get rid of nacl_target_arch when someday
# NaCl V8 builds stop using the ARM simulator
'nacl_target_arch%': 'none', # must be set externally
# 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
# ARM target. Leaving the default value of 'false' will avoid the use of
# these registers in the snapshot and use CPU feature probing when running
# on the target.
'v8_can_use_vfp32dregs%': 'false',
'arm_test_noprobe%': 'off',
# Similar to vfp but on MIPS.
'v8_can_use_fpu_instructions%': 'true',
# Similar to the ARM hard float ABI but on MIPS.
'v8_use_mips_abi_hardfloat%': 'true',
# Force disable libstdc++ debug mode.
'disable_glibcxx_debug%': 0,
'v8_enable_backtrace%': 0,
# Enable profiling support. Only required on Windows.
'v8_enable_prof%': 0,
# Some versions of GCC 4.5 seem to need -fno-strict-aliasing.
'v8_no_strict_aliasing%': 0,
# Chrome needs this definition unconditionally. For standalone V8 builds,
# it's handled in gypfiles/standalone.gypi.
'want_separate_host_toolset%': 1,
# Toolset the d8 binary should be compiled for. Possible values are 'host'
# and 'target'. If you want to run v8 tests, it needs to be set to 'target'.
# The setting is ignored if want_separate_host_toolset is 0.
'v8_toolset_for_d8%': 'target',
'host_os%': '<(OS)',
'werror%': '-Werror',
# For a shared library build, results in "libv8-<(soname_version).so".
'soname_version%': '',
# Allow to suppress the array bounds warning (default is no suppression).
'wno_array_bounds%': '',
# Override where to find binutils
'binutils_dir%': '',
'conditions': [
['OS=="linux" and host_arch=="x64"', {
'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
}],
['OS=="linux" and host_arch=="ia32"', {
'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
}],
# linux_use_bundled_gold: whether to use the gold linker binary checked
# into third_party/binutils. Force this off via GYP_DEFINES when you
# are using a custom toolchain and need to control -B in ldflags.
# Do not use 32-bit gold on 32-bit hosts as it runs out address space
# for component=static_library builds.
['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
'linux_use_bundled_gold%': 1,
}, {
'linux_use_bundled_gold%': 0,
}],
# linux_use_bundled_binutils: whether to use the binary binutils
# checked into third_party/binutils. These are not multi-arch so cannot
# be used except on x86 and x86-64 (the only two architectures which
# are currently checke in). Force this off via GYP_DEFINES when you
# are using a custom toolchain and need to control -B in cflags.
['OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
'linux_use_bundled_binutils%': 1,
}, {
'linux_use_bundled_binutils%': 0,
}],
# linux_use_gold_flags: whether to use build flags that rely on gold.
# On by default for x64 Linux.
['OS=="linux" and target_arch=="x64"', {
'linux_use_gold_flags%': 1,
}, {
'linux_use_gold_flags%': 0,
}],
],
# Link-Time Optimizations
'use_lto%': 0,
},
'conditions': [
['host_arch=="ia32" or host_arch=="x64" or \
host_arch=="ppc" or host_arch=="ppc64" or \
host_arch=="s390" or host_arch=="s390x" 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 \
target_arch=="ppc" or target_arch=="ppc64" or target_arch=="s390" or \
target_arch=="s390x" or clang==1', {
'variables': {
'target_cxx_is_biarch%': 1,
},
}, {
'variables': {
'target_cxx_is_biarch%': 0,
},
}],
],
'target_defaults': {
'conditions': [
['v8_target_arch=="arm"', {
'defines': [
'V8_TARGET_ARCH_ARM',
],
'conditions': [
[ 'arm_version==7 or arm_version=="default"', {
'defines': [
'CAN_USE_ARMV7_INSTRUCTIONS',
],
}],
[ 'arm_fpu=="vfpv3-d16" or arm_fpu=="default"', {
'defines': [
'CAN_USE_VFP3_INSTRUCTIONS',
],
}],
[ 'arm_fpu=="vfpv3"', {
'defines': [
'CAN_USE_VFP3_INSTRUCTIONS',
'CAN_USE_VFP32DREGS',
],
}],
[ 'arm_fpu=="neon"', {
'defines': [
'CAN_USE_VFP3_INSTRUCTIONS',
'CAN_USE_VFP32DREGS',
'CAN_USE_NEON',
],
}],
[ 'arm_test_noprobe=="on"', {
'defines': [
'ARM_TEST_NO_FEATURE_PROBE',
],
}],
],
'target_conditions': [
['_toolset=="host"', {
'conditions': [
['v8_target_arch==host_arch', {
# Host built with an Arm CXX compiler.
'conditions': [
[ 'arm_version==7', {
'cflags': ['-march=armv7-a',],
}],
[ 'arm_version==7 or arm_version=="default"', {
'conditions': [
[ 'arm_fpu!="default"', {
'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
}],
[ 'arm_float_abi!="default"', {
'cflags': ['-mfloat-abi=<(arm_float_abi)',],
}],
[ 'arm_thumb==1', {
'cflags': ['-mthumb',],
}],
[ 'arm_thumb==0', {
'cflags': ['-marm',],
}],
],
}, {
# 'v8_target_arch!=host_arch'
# Host not built with an Arm CXX compiler (simulator build).
'conditions': [
[ 'arm_float_abi=="hard"', {
'defines': [
'USE_EABI_HARDFLOAT=1',
],
}],
[ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
'defines': [
'USE_EABI_HARDFLOAT=0',
],
}],
],
}],
],
}], # _toolset=="host"
['_toolset=="target"', {
'conditions': [
['v8_target_arch==target_arch', {
# Target built with an Arm CXX compiler.
'conditions': [
[ 'arm_version==7', {
'cflags': ['-march=armv7-a',],
}],
[ 'arm_version==7 or arm_version=="default"', {
'conditions': [
[ 'arm_fpu!="default"', {
'cflags': ['-mfpu=<(arm_fpu)',],
}],
],
}],
[ 'arm_float_abi!="default"', {
'cflags': ['-mfloat-abi=<(arm_float_abi)',],
}],
[ 'arm_thumb==1', {
'cflags': ['-mthumb',],
}],
[ 'arm_thumb==0', {
'cflags': ['-marm',],
}],
],
}, {
# 'v8_target_arch!=target_arch'
# Target not built with an Arm CXX compiler (simulator build).
'conditions': [
[ 'arm_float_abi=="hard"', {
'defines': [
'USE_EABI_HARDFLOAT=1',
],
}],
[ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
'defines': [
'USE_EABI_HARDFLOAT=0',
],
}],
],
}],
# Disable GCC LTO for v8
# v8 is optimized for speed. Because GCC LTO merges flags at link
# time, we disable LTO to prevent any -O2 flags from taking
# precedence over v8's -Os flag. However, LLVM LTO does not work
# this way so we keep LTO enabled under LLVM.
['clang==0 and use_lto==1', {
'cflags!': [
'-flto',
'-ffat-lto-objects',
],
}],
],
}], # _toolset=="target"
],
}], # v8_target_arch=="arm"
['v8_target_arch=="arm64"', {
'defines': [
'V8_TARGET_ARCH_ARM64',
],
}],
['v8_target_arch=="s390" or v8_target_arch=="s390x"', {
'defines': [
'V8_TARGET_ARCH_S390',
],
'conditions': [
['v8_target_arch=="s390x"', {
'defines': [
'V8_TARGET_ARCH_S390X',
],
}],
['v8_host_byteorder=="little"', {
'defines': [
'V8_TARGET_ARCH_S390_LE_SIM',
],
}],
],
}], # s390
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
'defines': [
'V8_TARGET_ARCH_PPC',
],
'conditions': [
['v8_target_arch=="ppc64"', {
'defines': [
'V8_TARGET_ARCH_PPC64',
],
}],
['v8_host_byteorder=="little"', {
'defines': [
'V8_TARGET_ARCH_PPC_LE',
],
}],
['v8_host_byteorder=="big"', {
'defines': [
'V8_TARGET_ARCH_PPC_BE',
],
'conditions': [
['OS=="aix"', {
# Work around AIX ceil, trunc and round oddities.
'cflags': [ '-mcpu=power5+ -mfprnd' ],
}],
['OS=="aix"', {
# Work around AIX assembler popcntb bug.
'cflags': [ '-mno-popcntb' ],
}],
],
}],
],
}], # ppc
['v8_target_arch=="ia32"', {
'defines': [
'V8_TARGET_ARCH_IA32',
],
}], # v8_target_arch=="ia32"
['v8_target_arch=="x87"', {
'defines': [
'V8_TARGET_ARCH_X87',
],
'cflags': ['-march=i586'],
}], # v8_target_arch=="x87"
['(v8_target_arch=="mips" or v8_target_arch=="mipsel" \
or v8_target_arch=="mips64" or v8_target_arch=="mips64el") \
and v8_target_arch==target_arch', {
'target_conditions': [
['_toolset=="target"', {
# Target built with a Mips CXX compiler.
'variables': {
'ldso_path%': '<!(/bin/echo -n $LDSO_PATH)',
'ld_r_path%': '<!(/bin/echo -n $LD_R_PATH)',
},
'conditions': [
['ldso_path!=""', {
'ldflags': ['-Wl,--dynamic-linker=<(ldso_path)'],
}],
['ld_r_path!=""', {
'ldflags': ['-Wl,--rpath=<(ld_r_path)'],
}],
[ 'clang==1', {
'cflags': ['-integrated-as'],
}],
],
}],
],
}],
['v8_target_arch=="mips"', {
'defines': [
'V8_TARGET_ARCH_MIPS',
],
'conditions': [
[ 'v8_can_use_fpu_instructions=="true"', {
'defines': [
'CAN_USE_FPU_INSTRUCTIONS',
],
}],
[ 'v8_use_mips_abi_hardfloat=="true"', {
'defines': [
'__mips_hard_float=1',
'CAN_USE_FPU_INSTRUCTIONS',
],
}, {
'defines': [
'__mips_soft_float=1'
]
}],
],
'target_conditions': [
['_toolset=="target"', {
'conditions': [
['v8_target_arch==target_arch', {
# Target built with a Mips CXX compiler.
'cflags': [
'-EB',
'-Wno-error=array-bounds', # Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
],
'ldflags': ['-EB'],
'conditions': [
[ 'v8_use_mips_abi_hardfloat=="true"', {
'cflags': ['-mhard-float'],
'ldflags': ['-mhard-float'],
}, {
'cflags': ['-msoft-float'],
'ldflags': ['-msoft-float'],
}],
['mips_arch_variant=="r6"', {
'defines': [
'_MIPS_ARCH_MIPS32R6',
'FPU_MODE_FP64',
],
'cflags!': ['-mfp32', '-mfpxx'],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips32r6'],
}],
],
'cflags': ['-mips32r6'],
'ldflags': ['-mips32r6'],
}],
['mips_arch_variant=="r2"', {
'conditions': [
[ 'mips_fpu_mode=="fp64"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP64',
],
'cflags': ['-mfp64'],
}],
['mips_fpu_mode=="fpxx"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FPXX',
],
'cflags': ['-mfpxx'],
}],
['mips_fpu_mode=="fp32"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP32',
],
'cflags': ['-mfp32'],
}],
[ 'clang==0', {
'cflags': ['-Wa,-mips32r2'],
}],
],
'cflags': ['-mips32r2'],
'ldflags': ['-mips32r2'],
}],
['mips_arch_variant=="r1"', {
'defines': [
'FPU_MODE_FP32',
],
'cflags!': ['-mfp64', '-mfpxx'],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips32'],
}],
],
'cflags': ['-mips32'],
'ldflags': ['-mips32'],
}],
['mips_arch_variant=="rx"', {
'defines': [
'_MIPS_ARCH_MIPS32RX',
'FPU_MODE_FPXX',
],
'cflags!': ['-mfp64', '-mfp32'],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips32'],
}],
],
'cflags': ['-mips32', '-mfpxx'],
'ldflags': ['-mips32'],
}],
],
}, {
# 'v8_target_arch!=target_arch'
# Target not built with an MIPS CXX compiler (simulator build).
'conditions': [
['mips_arch_variant=="r6"', {
'defines': [
'_MIPS_ARCH_MIPS32R6',
'FPU_MODE_FP64',
],
}],
['mips_arch_variant=="r2"', {
'conditions': [
[ 'mips_fpu_mode=="fp64"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP64',
],
}],
['mips_fpu_mode=="fpxx"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FPXX',
],
}],
['mips_fpu_mode=="fp32"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP32',
],
}],
],
}],
['mips_arch_variant=="r1"', {
'defines': [
'FPU_MODE_FP32',
],
}],
['mips_arch_variant=="rx"', {
'defines': [
'_MIPS_ARCH_MIPS32RX',
'FPU_MODE_FPXX',
],
}],
],
}],
],
}], #_toolset=="target"
['_toolset=="host"', {
'conditions': [
['mips_arch_variant=="rx"', {
'defines': [
'_MIPS_ARCH_MIPS32RX',
'FPU_MODE_FPXX',
],
}],
['mips_arch_variant=="r6"', {
'defines': [
'_MIPS_ARCH_MIPS32R6',
'FPU_MODE_FP64',
],
}],
['mips_arch_variant=="r2"', {
'conditions': [
['mips_fpu_mode=="fp64"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP64',
],
}],
['mips_fpu_mode=="fpxx"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FPXX',
],
}],
['mips_fpu_mode=="fp32"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP32'
],
}],
],
}],
['mips_arch_variant=="r1"', {
'defines': ['FPU_MODE_FP32',],
}],
]
}], #_toolset=="host"
],
}], # v8_target_arch=="mips"
['v8_target_arch=="mipsel"', {
'defines': [
'V8_TARGET_ARCH_MIPS',
],
'conditions': [
[ 'v8_can_use_fpu_instructions=="true"', {
'defines': [
'CAN_USE_FPU_INSTRUCTIONS',
],
}],
[ 'v8_use_mips_abi_hardfloat=="true"', {
'defines': [
'__mips_hard_float=1',
'CAN_USE_FPU_INSTRUCTIONS',
],
}, {
'defines': [
'__mips_soft_float=1'
],
}],
],
'target_conditions': [
['_toolset=="target"', {
'conditions': [
['v8_target_arch==target_arch', {
# Target built with a Mips CXX compiler.
'cflags': [
'-EL',
'-Wno-error=array-bounds', # Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
],
'ldflags': ['-EL'],
'conditions': [
[ 'v8_use_mips_abi_hardfloat=="true"', {
'cflags': ['-mhard-float'],
'ldflags': ['-mhard-float'],
}, {
'cflags': ['-msoft-float'],
'ldflags': ['-msoft-float'],
}],
['mips_arch_variant=="r6"', {
'defines': [
'_MIPS_ARCH_MIPS32R6',
'FPU_MODE_FP64',
],
'cflags!': ['-mfp32', '-mfpxx'],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips32r6'],
}],
],
'cflags': ['-mips32r6'],
'ldflags': ['-mips32r6'],
}],
['mips_arch_variant=="r2"', {
'conditions': [
[ 'mips_fpu_mode=="fp64"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP64',
],
'cflags': ['-mfp64'],
}],
['mips_fpu_mode=="fpxx"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FPXX',
],
'cflags': ['-mfpxx'],
}],
['mips_fpu_mode=="fp32"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP32',
],
'cflags': ['-mfp32'],
}],
[ 'clang==0', {
'cflags': ['-Wa,-mips32r2'],
}],
],
'cflags': ['-mips32r2'],
'ldflags': ['-mips32r2'],
}],
['mips_arch_variant=="r1"', {
'cflags!': ['-mfp64', '-mfpxx'],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips32'],
}],
],
'cflags': ['-mips32'],
'ldflags': ['-mips32'],
}],
['mips_arch_variant=="rx"', {
'defines': [
'_MIPS_ARCH_MIPS32RX',
'FPU_MODE_FPXX',
],
'cflags!': ['-mfp64', '-mfp32'],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips32'],
}],
],
'cflags': ['-mips32', '-mfpxx'],
'ldflags': ['-mips32'],
}],
['mips_arch_variant=="loongson"', {
'defines': [
'_MIPS_ARCH_LOONGSON',
'FPU_MODE_FP32',
],
'cflags!': ['-mfp64', '-mfpxx'],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips3'],
}],
],
'cflags': ['-mips3', '-mfp32'],
}],
],
}, {
# 'v8_target_arch!=target_arch'
# Target not built with an MIPS CXX compiler (simulator build).
'conditions': [
['mips_arch_variant=="r6"', {
'defines': [
'_MIPS_ARCH_MIPS32R6',
'FPU_MODE_FP64',
],
}],
['mips_arch_variant=="r2"', {
'conditions': [
[ 'mips_fpu_mode=="fp64"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP64',
],
}],
['mips_fpu_mode=="fpxx"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FPXX',
],
}],
['mips_fpu_mode=="fp32"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP32',
],
}],
],
}],
['mips_arch_variant=="r1"', {
'defines': [
'FPU_MODE_FP32',
],
}],
['mips_arch_variant=="rx"', {
'defines': [
'_MIPS_ARCH_MIPS32RX',
'FPU_MODE_FPXX',
],
}],
['mips_arch_variant=="loongson"', {
'defines': [
'_MIPS_ARCH_LOONGSON',
'FPU_MODE_FP32',
],
}],
],
}],
],
}], #_toolset=="target
['_toolset=="host"', {
'conditions': [
['mips_arch_variant=="rx"', {
'defines': [
'_MIPS_ARCH_MIPS32RX',
'FPU_MODE_FPXX',
],
}],
['mips_arch_variant=="r6"', {
'defines': [
'_MIPS_ARCH_MIPS32R6',
'FPU_MODE_FP64',
],
}],
['mips_arch_variant=="r2"', {
'conditions': [
['mips_fpu_mode=="fp64"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP64',
],
}],
['mips_fpu_mode=="fpxx"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FPXX',
],
}],
['mips_fpu_mode=="fp32"', {
'defines': [
'_MIPS_ARCH_MIPS32R2',
'FPU_MODE_FP32'
],
}],
],
}],
['mips_arch_variant=="r1"', {
'defines': ['FPU_MODE_FP32',],
}],
['mips_arch_variant=="loongson"', {
'defines': [
'_MIPS_ARCH_LOONGSON',
'FPU_MODE_FP32',
],
}],
]
}],
],
}], # v8_target_arch=="mipsel"
['v8_target_arch=="mips64el" or v8_target_arch=="mips64"', {
'defines': [
'V8_TARGET_ARCH_MIPS64',
],
'conditions': [
[ 'v8_can_use_fpu_instructions=="true"', {
'defines': [
'CAN_USE_FPU_INSTRUCTIONS',
],
}],
[ 'v8_host_byteorder=="little"', {
'defines': [
'V8_TARGET_ARCH_MIPS64_LE',
],
}],
[ 'v8_host_byteorder=="big"', {
'defines': [
'V8_TARGET_ARCH_MIPS64_BE',
],
}],
[ 'v8_use_mips_abi_hardfloat=="true"', {
'defines': [
'__mips_hard_float=1',
'CAN_USE_FPU_INSTRUCTIONS',
],
}, {
'defines': [
'__mips_soft_float=1'
],
}],
],
'target_conditions': [
['_toolset=="target"', {
'conditions': [
['v8_target_arch==target_arch', {
'cflags': [
'-Wno-error=array-bounds', # Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273
],
'conditions': [
['v8_target_arch=="mips64el"', {
'cflags': ['-EL'],
'ldflags': ['-EL'],
}],
['v8_target_arch=="mips64"', {
'cflags': ['-EB'],
'ldflags': ['-EB'],
}],
[ 'v8_use_mips_abi_hardfloat=="true"', {
'cflags': ['-mhard-float'],
'ldflags': ['-mhard-float'],
}, {
'cflags': ['-msoft-float'],
'ldflags': ['-msoft-float'],
}],
['mips_arch_variant=="r6"', {
'defines': ['_MIPS_ARCH_MIPS64R6',],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips64r6'],
}],
],
'cflags': ['-mips64r6', '-mabi=64'],
'ldflags': ['-mips64r6', '-mabi=64'],
}],
['mips_arch_variant=="r2"', {
'defines': ['_MIPS_ARCH_MIPS64R2',],
'conditions': [
[ 'clang==0', {
'cflags': ['-Wa,-mips64r2'],
}],
],
'cflags': ['-mips64r2', '-mabi=64'],
'ldflags': ['-mips64r2', '-mabi=64'],
}],
],
}, {
# 'v8_target_arch!=target_arch'
# Target not built with an MIPS CXX compiler (simulator build).
'conditions': [
['mips_arch_variant=="r6"', {
'defines': ['_MIPS_ARCH_MIPS64R6',],
}],
['mips_arch_variant=="r2"', {
'defines': ['_MIPS_ARCH_MIPS64R2',],
}],
],
}],
],
}], #'_toolset=="target"
['_toolset=="host"', {
'conditions': [
['mips_arch_variant=="r6"', {
'defines': ['_MIPS_ARCH_MIPS64R6',],
}],
['mips_arch_variant=="r2"', {
'defines': ['_MIPS_ARCH_MIPS64R2',],
}],
],
}], #'_toolset=="host"
],
}], # v8_target_arch=="mips64el"
['v8_target_arch=="x64"', {
'defines': [
'V8_TARGET_ARCH_X64',
],
'xcode_settings': {
'ARCHS': [ 'x86_64' ],
},
'msvs_settings': {
'VCLinkerTool': {
'StackReserveSize': '2097152',
},
},
'msvs_configuration_platform': 'x64',
}], # v8_target_arch=="x64"
['v8_target_arch=="x32"', {
'defines': [
# x32 port shares the source code with x64 port.
'V8_TARGET_ARCH_X64',
'V8_TARGET_ARCH_32_BIT',
],
'cflags': [
'-mx32',
# Inhibit warning if long long type is used.
'-Wno-long-long',
],
'ldflags': [
'-mx32',
],
}], # v8_target_arch=="x32"
['linux_use_gold_flags==1', {
# Newer gccs and clangs support -fuse-ld, use the flag to force gold
# selection.
# gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
'ldflags': [ '-fuse-ld=gold', ],
}],
['linux_use_bundled_binutils==1', {
'cflags': [
'-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
],
}],
['linux_use_bundled_gold==1', {
# Put our binutils, which contains gold in the search path. We pass
# the path to gold to the compiler. gyp leaves unspecified what the
# cwd is when running the compiler, so the normal gyp path-munging
# fails us. This hack gets the right path.
'ldflags': [
'-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
],
}],
['OS=="win"', {
'defines': [
'WIN32',
],
# 4351: VS 2005 and later are warning us that they've fixed a bug
# present in VS 2003 and earlier.
'msvs_disabled_warnings': [4351],
'msvs_configuration_attributes': {
'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
'CharacterSet': '1',
},
}],
['OS=="win" and v8_target_arch=="ia32"', {
'msvs_settings': {
'VCCLCompilerTool': {
# Ensure no surprising artifacts from 80bit double math with x86.
'AdditionalOptions': ['/arch:SSE2'],
},
},
}],
['OS=="win" and v8_enable_prof==1', {
'msvs_settings': {
'VCLinkerTool': {
'GenerateMapFile': 'true',
},
},
}],
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
v8_target_arch=="ia32"', {
'cflags': [
'-msse2',
'-mfpmath=sse',
'-mmmx', # Allows mmintrin.h for MMX intrinsics.
],
}],
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
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=="x87" or v8_target_arch=="mips" or \
v8_target_arch=="mipsel" or v8_target_arch=="ppc" or \
v8_target_arch=="s390")', {
'target_conditions': [
['_toolset=="host"', {
'conditions': [
['host_cxx_is_biarch==1', {
'conditions': [
['host_arch=="s390" or host_arch=="s390x"', {
'cflags': [ '-m31' ],
'ldflags': [ '-m31' ]
},{
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ]
}],
],
}],
],
'xcode_settings': {
'ARCHS': [ 'i386' ],
},
}],
['_toolset=="target"', {
'conditions': [
['target_cxx_is_biarch==1 and nacl_target_arch!="nacl_x64"', {
'conditions': [
['host_arch=="s390" or host_arch=="s390x"', {
'cflags': [ '-m31' ],
'ldflags': [ '-m31' ]
},{
'cflags': [ '-m32' ],
'ldflags': [ '-m32' ],
}],
],
}],
],
'xcode_settings': {
'ARCHS': [ 'i386' ],
},
}],
],
}],
['(OS=="linux" or OS=="android") and \
(v8_target_arch=="x64" or v8_target_arch=="arm64" or \
v8_target_arch=="ppc64" or v8_target_arch=="s390x")', {
'target_conditions': [
['_toolset=="host"', {
'conditions': [
['host_cxx_is_biarch==1', {
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ]
}],
],
}],
['_toolset=="target"', {
'conditions': [
['target_cxx_is_biarch==1', {
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
]
}],
],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
or OS=="netbsd" or OS=="qnx" or OS=="aix"', {
'conditions': [
[ 'v8_no_strict_aliasing==1', {
'cflags': [ '-fno-strict-aliasing' ],
}],
], # conditions
}],
['OS=="solaris"', {
'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
}],
['OS=="freebsd" or OS=="openbsd"', {
'cflags': [ '-I/usr/local/include' ],
}],
['OS=="netbsd"', {
'cflags': [ '-I/usr/pkg/include' ],
}],
['OS=="aix"', {
'defines': [
# Support for malloc(0)
'_LINUX_SOURCE_COMPAT=1',
'_ALL_SOURCE=1'],
'conditions': [
[ 'v8_target_arch=="ppc"', {
'ldflags': [ '-Wl,-bmaxdata:0x60000000/dsa' ],
}],
[ 'v8_target_arch=="ppc64"', {
'cflags': [ '-maix64' ],
'ldflags': [ '-maix64' ],
}],
],
}],
], # conditions
'configurations': {
# Abstract configuration for v8_optimized_debug == 0.
'DebugBase0': {
'abstract': 1,
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': '0',
'conditions': [
['component=="shared_library"', {
'RuntimeLibrary': '3', # /MDd
}, {
'RuntimeLibrary': '1', # /MTd
}],
],
},
'VCLinkerTool': {
'LinkIncremental': '2',
},
},
'variables': {
'v8_enable_slow_dchecks%': 1,
},
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
OS=="qnx" or OS=="aix"', {
'cflags!': [
'-O3',
'-O2',
'-O1',
'-Os',
],
'cflags': [
'-fdata-sections',
'-ffunction-sections',
],
}],
['OS=="mac"', {
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '0', # -O0
},
}],
['v8_enable_slow_dchecks==1', {
'defines': [
'ENABLE_SLOW_DCHECKS',
],
}],
],
}, # DebugBase0
# Abstract configuration for v8_optimized_debug == 1.
'DebugBase1': {
'abstract': 1,
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': '2',
'InlineFunctionExpansion': '2',
'EnableIntrinsicFunctions': 'true',
'FavorSizeOrSpeed': '0',
'StringPooling': 'true',
'BasicRuntimeChecks': '0',
'conditions': [
['component=="shared_library"', {
'RuntimeLibrary': '3', #/MDd
}, {
'RuntimeLibrary': '1', #/MTd
}],
],
},
'VCLinkerTool': {
'LinkIncremental': '1',
'OptimizeReferences': '2',
'EnableCOMDATFolding': '2',
},
},
'variables': {
'v8_enable_slow_dchecks%': 0,
},
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
OS=="qnx" or OS=="aix"', {
'cflags!': [
'-O0',
'-O1',
'-Os',
],
'cflags': [
'-fdata-sections',
'-ffunction-sections',
],
'conditions': [
# TODO(crbug.com/272548): Avoid -O3 in NaCl
# Don't use -O3 with sanitizers.
['nacl_target_arch=="none" and asan==0 and msan==0 and lsan==0 \
and tsan==0 and ubsan==0 and ubsan_vptr==0', {
'cflags': ['-O3'],
'cflags!': ['-O2'],
}, {
'cflags': ['-O2'],
'cflags!': ['-O3'],
}],
],
}],
['OS=="mac"', {
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '3', # -O3
'GCC_STRICT_ALIASING': 'YES',
},
}],
['v8_enable_slow_dchecks==1', {
'defines': [
'ENABLE_SLOW_DCHECKS',
],
}],
],
}, # DebugBase1
# Common settings for the Debug configuration.
'DebugBaseCommon': {
'abstract': 1,
'defines': [
'ENABLE_DISASSEMBLER',
'V8_ENABLE_CHECKS',
'OBJECT_PRINT',
'VERIFY_HEAP',
'DEBUG',
'TRACE_MAPS'
],
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
OS=="qnx" or OS=="aix"', {
'cflags': [ '-Woverloaded-virtual', '<(wno_array_bounds)', ],
}],
['OS=="linux" and v8_enable_backtrace==1', {
# Support for backtrace_symbols.
'ldflags': [ '-rdynamic' ],
}],
['OS=="linux" and disable_glibcxx_debug==0', {
# Enable libstdc++ debugging facilities to help catch problems
# early, see http://crbug.com/65151 .
'defines': ['_GLIBCXX_DEBUG=1',],
}],
['OS=="aix"', {
'ldflags': [ '-Wl,-bbigtoc' ],
'conditions': [
['v8_target_arch=="ppc64"', {
'cflags': [ '-maix64 -mcmodel=large' ],
}],
],
}],
['OS=="android"', {
'variables': {
'android_full_debug%': 1,
},
'conditions': [
['android_full_debug==0', {
# Disable full debug if we want a faster v8 in a debug build.
# TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG.
'defines!': [
'DEBUG',
'ENABLE_SLOW_DCHECKS',
],
}],
],
}],
# TODO(pcc): Re-enable in LTO builds once we've fixed the intermittent
# link failures (crbug.com/513074).
['linux_use_gold_flags==1 and use_lto==0', {
'target_conditions': [
['_toolset=="target"', {
'ldflags': [
# Experimentation found that using four linking threads
# saved ~20% of link time.
# https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
# Only apply this to the target linker, since the host
# linker might not be gold, but isn't used much anyway.
'-Wl,--threads',
'-Wl,--thread-count=4',
],
}],
],
}],
],
}, # DebugBaseCommon
'Debug': {
'inherit_from': ['DebugBaseCommon'],
'conditions': [
['v8_optimized_debug==0', {
'inherit_from': ['DebugBase0'],
}, {
'inherit_from': ['DebugBase1'],
}],
],
}, # Debug
'ReleaseBase': {
'abstract': 1,
'variables': {
'v8_enable_slow_dchecks%': 0,
},
'conditions': [
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \
or OS=="aix"', {
'cflags!': [
'-Os',
],
'cflags': [
'-fdata-sections',
'-ffunction-sections',
'<(wno_array_bounds)',
],
'conditions': [
# TODO(crbug.com/272548): Avoid -O3 in NaCl
# Don't use -O3 with sanitizers.
['nacl_target_arch=="none" and asan==0 and msan==0 and lsan==0 \
and tsan==0 and ubsan==0 and ubsan_vptr==0', {
'cflags': ['-O3'],
'cflags!': ['-O2'],
}, {
'cflags': ['-O2'],
'cflags!': ['-O3'],
}],
],
}],
['OS=="android"', {
'cflags!': [
'-O3',
'-Os',
],
'cflags': [
'-fdata-sections',
'-ffunction-sections',
'-O2',
],
}],
['OS=="mac"', {
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '3', # -O3
# -fstrict-aliasing. Mainline gcc
# enables this at -O2 and above,
# but Apple gcc does not unless it
# is specified explicitly.
'GCC_STRICT_ALIASING': 'YES',
},
}], # OS=="mac"
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
'Optimization': '2',
'InlineFunctionExpansion': '2',
'EnableIntrinsicFunctions': 'true',
'FavorSizeOrSpeed': '0',
'StringPooling': 'true',
'conditions': [
['component=="shared_library"', {
'RuntimeLibrary': '2', #/MD
}, {
'RuntimeLibrary': '0', #/MT
}],
],
},
'VCLinkerTool': {
'LinkIncremental': '1',
'OptimizeReferences': '2',
'EnableCOMDATFolding': '2',
},
},
}], # OS=="win"
['v8_enable_slow_dchecks==1', {
'defines': [
'ENABLE_SLOW_DCHECKS',
],
}],
], # conditions
}, # Release
'Release': {
'inherit_from': ['ReleaseBase'],
}, # Debug
'conditions': [
[ 'OS=="win"', {
# TODO(bradnelson): add a gyp mechanism to make this more graceful.
'Debug_x64': {
'inherit_from': ['DebugBaseCommon'],
'conditions': [
['v8_optimized_debug==0', {
'inherit_from': ['DebugBase0'],
}, {
'inherit_from': ['DebugBase1'],
}],
],
},
'Release_x64': {
'inherit_from': ['ReleaseBase'],
},
}],
],
}, # configurations
}, # target_defaults
}
......@@ -30,7 +30,7 @@
'v8_code': 1,
'v8_enable_i18n_support%': 1,
},
'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'],
'target_defaults': {
'type': 'executable',
'dependencies': [
......
......@@ -4,7 +4,7 @@
{
'includes': [
'../third_party/icu/icu.isolate',
'../build/config/win/msvs_dependencies.isolate',
'../gypfiles/config/win/msvs_dependencies.isolate',
],
'conditions': [
['use_custom_libcxx==1', {
......
......@@ -33,7 +33,7 @@
'v8_enable_i18n_support%': 1,
'v8_toolset_for_d8%': 'target',
},
'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'd8',
......@@ -150,7 +150,7 @@
'd8',
],
'includes': [
'../build/isolate.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'd8.isolate',
......
......@@ -29,7 +29,7 @@
'variables': {
'v8_code': 1,
},
'includes': ['../../../build/toolchain.gypi', '../../../build/features.gypi'],
'includes': ['../../../gypfiles/toolchain.gypi', '../../../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'v8_vtune',
......
......@@ -37,7 +37,7 @@
'v8_experimental_extra_library_files%': [],
'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
},
'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'v8',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'benchmarks.isolate',
......
......@@ -20,8 +20,8 @@
'webkit/webkit.gyp:webkit_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
'../gypfiles/features.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'bot_default.isolate',
......
......@@ -30,7 +30,7 @@
'v8_code': 1,
'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
},
'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'cctest',
......@@ -420,7 +420,7 @@
'cctest',
],
'includes': [
'../../build/isolate.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'cctest_exe.isolate',
......@@ -433,7 +433,7 @@
'cctest_exe_run',
],
'includes': [
'../../build/isolate.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'cctest.isolate',
......
......@@ -19,8 +19,8 @@
'unittests/unittests.gyp:unittests_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
'../gypfiles/features.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'default.isolate',
......
......@@ -6,7 +6,7 @@
'variables': {
'v8_code': 1,
},
'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'json_fuzzer',
......@@ -174,7 +174,7 @@
'regexp_fuzzer',
],
'includes': [
'../../build/isolate.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'fuzzer.isolate',
......
......@@ -14,8 +14,8 @@
'mjsunit/mjsunit.gyp:mjsunit_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
'../gypfiles/features.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'ignition.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'intl.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'message.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'mjsunit.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'mozilla.isolate',
......
......@@ -16,8 +16,8 @@
'webkit/webkit.gyp:webkit_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
'../gypfiles/features.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'optimize_for_size.isolate',
......
......@@ -14,8 +14,8 @@
'../src/d8.gyp:d8_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
'../gypfiles/features.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'perf.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'preparser.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'simdjs.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'test262.isolate',
......
......@@ -6,7 +6,7 @@
'variables': {
'v8_code': 1,
},
'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'unittests',
......@@ -211,7 +211,7 @@
'unittests',
],
'includes': [
'../../build/isolate.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'unittests.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'webkit.isolate',
......
......@@ -23,7 +23,7 @@ BINUTILS_TOOLS = ['bin/ld.gold', 'bin/objcopy', 'bin/objdump']
BINUTILS_OUT = 'Release'
DETECT_HOST_ARCH = os.path.abspath(os.path.join(
BINUTILS_DIR, '../../build/detect_v8_host_arch.py'))
BINUTILS_DIR, '../../gypfiles/detect_v8_host_arch.py'))
def ReadFile(filename):
......
......@@ -13,8 +13,8 @@
'../src/d8.gyp:d8_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
'../gypfiles/features.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'check-static-initializers.isolate',
......
......@@ -10,8 +10,8 @@
'target_name': 'run_gcmole_run',
'type': 'none',
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'run-gcmole.isolate',
......
......@@ -13,8 +13,8 @@
'../../src/d8.gyp:d8_run',
],
'includes': [
'../../build/features.gypi',
'../../build/isolate.gypi',
'../../gypfiles/features.gypi',
'../../gypfiles/isolate.gypi',
],
'sources': [
'jsfunfuzz.isolate',
......
......@@ -30,7 +30,7 @@
'v8_code': 1,
'v8_enable_i18n_support%': 1,
},
'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'],
'targets': [
{
'target_name': 'parser-shell',
......
......@@ -13,8 +13,8 @@
'../src/d8.gyp:d8_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
'../gypfiles/features.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'run-deopt-fuzzer.isolate',
......
......@@ -13,8 +13,8 @@
'../src/d8.gyp:d8_run',
],
'includes': [
'../build/features.gypi',
'../build/isolate.gypi',
'../gypfiles/features.gypi',
'../gypfiles/isolate.gypi',
],
'sources': [
'run-valgrind.isolate',
......
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