Commit e2078450 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[build] Unify snapshot targets

Change-Id: I208b0e39b3755e84683aae9f6e23053858120b6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1906383Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64904}
parent 2afd61fb
...@@ -1384,94 +1384,50 @@ action("v8_dump_build_config") { ...@@ -1384,94 +1384,50 @@ action("v8_dump_build_config") {
# Source Sets (aka static libraries) # Source Sets (aka static libraries)
# #
source_set("v8_maybe_snapshot") { v8_source_set("v8_snapshot") {
if (v8_use_external_startup_data) { visibility = [ ":*" ] # Targets in this file can depend on this.
public_deps = [
":v8_external_snapshot",
]
} else {
public_deps = [
":v8_snapshot",
]
}
}
if (!v8_use_external_startup_data) {
v8_source_set("v8_snapshot") {
# Only targets in this file and the top-level visibility target can
# depend on this.
visibility = [
":*",
"//:gn_visibility",
]
deps = [] deps = []
public_deps = [ public_deps = [
# This should be public so downstream targets can declare the snapshot # This should be public so downstream targets can declare the snapshot
# output file as their inputs. # output file as their inputs.
":run_mksnapshot_default", ":run_mksnapshot_default",
":v8_maybe_icu", ]
]
# Do not publicize any header to remove build dependency. # Do not publicize any header to remove build dependency.
public = [] public = []
sources = [ sources = [ "src/init/setup-isolate-deserialize.cc" ]
"$target_gen_dir/snapshot.cc", if (emit_builtins_as_inline_asm) {
"src/init/setup-isolate-deserialize.cc", deps += [ ":asm_to_inline_asm_default" ]
] sources += [ "$target_gen_dir/embedded.cc" ]
} else {
if (emit_builtins_as_inline_asm) { sources += [ "$target_gen_dir/embedded.S" ]
deps += [ ":asm_to_inline_asm_default" ]
sources += [ "$target_gen_dir/embedded.cc" ]
} else {
sources += [ "$target_gen_dir/embedded.S" ]
}
configs = [ ":internal_config" ]
} }
}
if (v8_use_external_startup_data) { configs = [ ":internal_config" ]
v8_source_set("v8_external_snapshot") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
deps = [ if (v8_use_external_startup_data) {
":v8_base", deps += [ ":v8_base" ]
]
public_deps = [ sources += [ "src/snapshot/snapshot-external.cc" ]
":run_mksnapshot_default",
]
if (v8_use_multi_snapshots) { if (v8_use_multi_snapshots) {
public_deps += [ ":run_mksnapshot_trusted" ] public_deps += [ ":run_mksnapshot_trusted" ]
} if (emit_builtins_as_inline_asm) {
sources = [
"src/init/setup-isolate-deserialize.cc",
"src/snapshot/snapshot-external.cc",
]
# Do not publicize any header to remove build dependency.
public = []
if (emit_builtins_as_inline_asm) {
deps += [ ":asm_to_inline_asm_default" ]
sources += [ "$target_gen_dir/embedded.cc" ]
if (v8_use_multi_snapshots) {
deps += [ ":asm_to_inline_asm_trusted" ] deps += [ ":asm_to_inline_asm_trusted" ]
sources += [ "$target_gen_dir/embedded_trusted.cc" ] sources += [ "$target_gen_dir/embedded_trusted.cc" ]
} } else {
} else {
sources += [ "$target_gen_dir/embedded.S" ]
if (v8_use_multi_snapshots) {
sources += [ "$target_gen_dir/embedded_trusted.S" ] sources += [ "$target_gen_dir/embedded_trusted.S" ]
} }
} }
} else {
# Also top-level visibility targets can depend on this.
visibility += [ "//:gn_visibility" ]
configs = [ ":internal_config" ] public_deps += [ ":v8_maybe_icu" ]
sources += [ "$target_gen_dir/snapshot.cc" ]
} }
} }
...@@ -3771,7 +3727,7 @@ v8_static_library("wee8") { ...@@ -3771,7 +3727,7 @@ v8_static_library("wee8") {
":v8_libbase", ":v8_libbase",
":v8_libplatform", ":v8_libplatform",
":v8_libsampler", ":v8_libsampler",
":v8_maybe_snapshot", ":v8_snapshot",
"//build/win:default_exe_manifest", "//build/win:default_exe_manifest",
] ]
...@@ -4071,7 +4027,7 @@ if (is_component_build) { ...@@ -4071,7 +4027,7 @@ if (is_component_build) {
public_deps = [ public_deps = [
":v8_base", ":v8_base",
":v8_maybe_snapshot", ":v8_snapshot",
] ]
configs = [ ":internal_config" ] configs = [ ":internal_config" ]
...@@ -4092,7 +4048,7 @@ if (is_component_build) { ...@@ -4092,7 +4048,7 @@ if (is_component_build) {
":v8_base", ":v8_base",
":v8_headers", ":v8_headers",
":v8_initializers", ":v8_initializers",
":v8_maybe_snapshot", ":v8_snapshot",
] ]
configs = [ ":internal_config" ] configs = [ ":internal_config" ]
...@@ -4103,7 +4059,7 @@ if (is_component_build) { ...@@ -4103,7 +4059,7 @@ if (is_component_build) {
group("v8") { group("v8") {
public_deps = [ public_deps = [
":v8_base", ":v8_base",
":v8_maybe_snapshot", ":v8_snapshot",
] ]
public_configs = [ ":external_config" ] public_configs = [ ":external_config" ]
...@@ -4117,7 +4073,7 @@ if (is_component_build) { ...@@ -4117,7 +4073,7 @@ if (is_component_build) {
":torque_ls_base", ":torque_ls_base",
":v8_base", ":v8_base",
":v8_initializers", ":v8_initializers",
":v8_maybe_snapshot", ":v8_snapshot",
] ]
public_configs = [ ":external_config" ] public_configs = [ ":external_config" ]
......
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