Repository navigation
Conversation
…PREFIX outside the checkout is refused with the route that works (#2353) Root cause: run_linux_sysroot_action (build/sdk.w) took compiler_default_llvm_prefix() whatever LLVM_PREFIX said, while the build tools pack and the sysroot pack read LLVM_PREFIX: two derivations of "which SDK this build uses". The packs also accepted a prefix outside the project root, which the build's file sandbox (ToolFs) refuses to read: "ToolFs path escapes project root in read_text: …/bin/cmake". The release runbook taught exactly that out-of-tree LLVM_PREFIX. sdk_llvm_prefix_in_project(root, LLVM_PREFIX) is the one answer: the named SDK as a project path, the pinned .deps SDK when none is named, "" outside the root. The linux and windows sysroot actions and both packs read it, and an outside prefix is refused once: "LLVM_PREFIX names an SDK outside this checkout (…): link it in with `ln -s … .deps/llvm-…` and leave LLVM_PREFIX unset". The release and bootstrap runbooks give that recipe. Test: sdk-contract-tests asserts the five cases of sdk_llvm_prefix_in_project. Verified on the Mac: with LLVM_PREFIX=~/with/.deps/… a fresh worktree's `:sdk-build-tools-pack` failed "ToolFs path escapes project root"; now it gives the refusal above, and with LLVM_PREFIX unset it builds.
Contributor
Author
|
Battery GREEN on the stack top |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause: run_linux_sysroot_action (build/sdk.w) took
compiler_default_llvm_prefix() whatever LLVM_PREFIX said, while the build
tools pack and the sysroot pack read LLVM_PREFIX: two derivations of "which
SDK this build uses". The packs also accepted a prefix outside the project
root, which the build's file sandbox (ToolFs) refuses to read: "ToolFs path
escapes project root in read_text: …/bin/cmake". The release runbook taught
exactly that out-of-tree LLVM_PREFIX.
sdk_llvm_prefix_in_project(root, LLVM_PREFIX) is the one answer: the named
SDK as a project path, the pinned .deps SDK when none is named, "" outside
the root. The linux and windows sysroot actions and both packs read it, and
an outside prefix is refused once: "LLVM_PREFIX names an SDK outside this
checkout (…): link it in with
ln -s … .deps/llvm-…and leave LLVM_PREFIXunset". The release and bootstrap runbooks give that recipe.
Test: sdk-contract-tests asserts the five cases of
sdk_llvm_prefix_in_project. Verified on the Mac: with
LLVM_PREFIX=~/with/.deps/… a fresh worktree's
:sdk-build-tools-packfailed"ToolFs path escapes project root"; now it gives the refusal above, and with
LLVM_PREFIX unset it builds.
Closes #2353