Commit 978acb8d authored by dpranke's avatar dpranke Committed by Commit bot

Adjust the visibility of the standalone targets in the GN build.

As part of the migration from GYP->GN, we want to make sure that we
can track when new targets are added to either the GYP or GN builds
and that we are building everything we expect to build.

In GN, unlike GYP, if a build file gets referenced from other files,
building 'all' will cause every target to be built in it. This means in
particular, that we can end up trying to build targets that are not
necessarily intended to be visible to the rest of the build. To get
around this, any target that is defined but hidden (like 'v8_snapshot',
in V8's case) should still be visible to a top-level target called
"//:gn_visibility".

R=brettw@chromium.org, machenbach@chromium.org
BUG=461019
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#28243}
parent cf53fed9
......@@ -338,7 +338,12 @@ if (v8_use_external_startup_data) {
}
action("postmortem-metadata") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
# Only targets in this file and the top-level visibility target can
# depend on this.
visibility = [
":*",
"//:gn_visibility",
]
script = "tools/gen-postmortem-metadata.py"
......@@ -423,7 +428,12 @@ source_set("v8_nosnapshot") {
}
source_set("v8_snapshot") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
# Only targets in this file and the top-level visibility target can
# depend on this.
visibility = [
":*",
"//:gn_visibility",
]
deps = [
":js2c",
......
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