Skip to content

Commit

Permalink
Preserve --experimental_allow_unresolved_symlinks in exec cfg (bazelb…
Browse files Browse the repository at this point in the history
…uild#15737)

See bazelbuild#10298 (comment)

Work towards bazelbuild#10298

Closes bazelbuild#15702.

PiperOrigin-RevId: 456480627
Change-Id: Ib1237ce9e2c0bab0d7eabd8743f08ec60b8b7ab7

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
  • Loading branch information
ckolli5 and fmeum authored Jun 27, 2022
1 parent d4775a1 commit fbc5cb6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ public FragmentOptions getHost() {
host.archivedArtifactsMnemonicsFilter = archivedArtifactsMnemonicsFilter;

host.enableAspectHints = enableAspectHints;
host.allowUnresolvedSymlinks = allowUnresolvedSymlinks;

return host;
}
Expand Down
17 changes: 17 additions & 0 deletions src/test/shell/bazel/bazel_symlink_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -584,4 +584,21 @@ EOF
expect_log "cycle in dependency graph"
}

function test_unresolved_symlink_in_exec_cfg() {
mkdir -p a
cat > a/BUILD <<'EOF'
load("//symlink:symlink.bzl", "dangling_symlink")
dangling_symlink(name="a", link_target="non/existent")
genrule(
name = "exec",
srcs = [],
outs = ["out"],
cmd = "touch $@",
exec_tools = [":a"],
)
EOF

bazel --windows_enable_symlinks build --experimental_allow_unresolved_symlinks //a:exec || fail "build failed"
}

run_suite "Tests for symlink artifacts"

0 comments on commit fbc5cb6

Please sign in to comment.