Commit 609b5e5e authored by jochen's avatar jochen Committed by Commit bot

Add GN target for the sample shell

I want to stop using d8 from the chromium build, so we could potentially
use it for running tests.

BUG=chromium:609107
R=machenbach@chromium.org
LOG=n

Review-Url: https://codereview.chromium.org/1944353002
Cr-Commit-Position: refs/heads/master@{#36060}
parent 0ae09761
......@@ -65,6 +65,7 @@ declare_args() {
v8_random_seed = "314159265"
v8_toolset_for_d8 = "host"
v8_toolset_for_shell = "host"
if (is_msan) {
# Running the V8-generated code on an ARM simulator is a powerful hack that
......@@ -2127,6 +2128,38 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") ||
}
}
if ((current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
(current_toolchain == snapshot_toolchain && v8_toolset_for_shell == "host") ||
(current_toolchain != host_toolchain && v8_toolset_for_shell == "target")) {
executable("shell") {
sources = [
"samples/shell.cc",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
configs += [
# Note: don't use :internal_config here because this target will get
# the :external_config applied to it by virtue of depending on :v8, and
# you can't have both applied to the same target.
":internal_config_base",
":features",
":toolchain",
]
deps = [
":v8",
":v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
]
if (v8_enable_i18n_support) {
deps += [ "//third_party/icu" ]
}
}
}
source_set("json_fuzzer") {
sources = [
"test/fuzzer/json.cc",
......
......@@ -81,6 +81,11 @@
# The setting is ignored if want_separate_host_toolset is 0.
'v8_toolset_for_d8%': 'target',
# Toolset the shell binary should be compiled for. Possible values are
# 'host' and 'target'.
# The setting is ignored if want_separate_host_toolset is 0.
'v8_toolset_for_shell%': 'target',
'host_os%': '<(OS)',
'werror%': '-Werror',
# For a shared library build, results in "libv8-<(soname_version).so".
......
......@@ -29,6 +29,7 @@
'variables': {
'v8_code': 1,
'v8_enable_i18n_support%': 1,
'v8_toolset_for_shell%': 'target',
},
'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'],
'target_defaults': {
......@@ -60,6 +61,11 @@
'sources': [
'shell.cc',
],
'conditions': [
[ 'want_separate_host_toolset==1', {
'toolsets': [ '<(v8_toolset_for_shell)', ],
}],
],
},
{
'target_name': 'hello-world',
......
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