Skip to content

Commit fea32be

Browse files
fmeumcopybara-github
authored andcommitted
Preserve --experimental_allow_unresolved_symlinks in exec cfg
See #10298 (comment) Work towards #10298 Closes #15702. PiperOrigin-RevId: 456480627 Change-Id: Ib1237ce9e2c0bab0d7eabd8743f08ec60b8b7ab7
1 parent 6a3f6fb commit fea32be

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java

+1
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,7 @@ public FragmentOptions getHost() {
947947
host.archivedArtifactsMnemonicsFilter = archivedArtifactsMnemonicsFilter;
948948

949949
host.enableAspectHints = enableAspectHints;
950+
host.allowUnresolvedSymlinks = allowUnresolvedSymlinks;
950951

951952
return host;
952953
}

src/test/shell/bazel/bazel_symlink_test.sh

+17
Original file line numberDiff line numberDiff line change
@@ -584,4 +584,21 @@ EOF
584584
expect_log "cycle in dependency graph"
585585
}
586586

587+
function test_unresolved_symlink_in_exec_cfg() {
588+
mkdir -p a
589+
cat > a/BUILD <<'EOF'
590+
load("//symlink:symlink.bzl", "dangling_symlink")
591+
dangling_symlink(name="a", link_target="non/existent")
592+
genrule(
593+
name = "exec",
594+
srcs = [],
595+
outs = ["out"],
596+
cmd = "touch $@",
597+
exec_tools = [":a"],
598+
)
599+
EOF
600+
601+
bazel --windows_enable_symlinks build --experimental_allow_unresolved_symlinks //a:exec || fail "build failed"
602+
}
603+
587604
run_suite "Tests for symlink artifacts"

0 commit comments

Comments
 (0)