Skip to content

Commit

Permalink
Preserve --experimental_allow_unresolved_symlinks in exec cfg
Browse files Browse the repository at this point in the history
See bazelbuild#10298 (comment)

Work towards bazelbuild#10298

Closes bazelbuild#15702.

PiperOrigin-RevId: 456480627
Change-Id: Ib1237ce9e2c0bab0d7eabd8743f08ec60b8b7ab7
  • Loading branch information
fmeum authored and aranguyen committed Jun 27, 2022
1 parent b84d6da commit fcbb399
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 @@ -947,6 +947,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 fcbb399

Please sign in to comment.