-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the exec root to be placed outside the output base
In an attempt to achieve 'Builds without the Bytes' without losing access to build outputs, I am experimenting with a FUSE file system that gives access to objects stored in the CAS. In PR #11703, I added a command line flag to let Bazel emit symbolic links pointing into this FUSE file system, as opposed to downloading files into the exec root. Though this change has allowed me to get quite a lot of stuff working, there are also many build actions that break. For example, Python calls realpath(argv[0]) to figure out its installation path. Because the FUSE file system does not mimic the execroot, Python won't be able to find its site packages. Similar problems hold with shared library resolution in general. This is why I think the only proper way we can get this to work is by using hard links instead of symbolic links. That way the usual file hierarchy remains intact. This, however, requires that the exec root itself is placed on a FUSE file system. It is already possible to achieve this by setting --output_base, but that has the downside of also placing many other files on FUSE (e.g., the sandbox directories), which is detrimental to performance. This change adds a new command line flag, --exec_root_base, which can be used to leave the output base at the regular place, but host the exec root directory on a FUSE file system. This change originally seemed to work all right with Bazel 3.4-3.7. In order to make this work with Bazel master, I had to make a slight tweak to the changes in 0c249d5. That code added the assumption that "${output_base}/external" is always placed at "${exec_root_base}/../external". I suspect that already causes a regression in case a BlazeModule overrides the exec root base. While there, rename 'execRootParent' to 'execRootBase', as it corresponds to the exec root itself; not its parent directory.
- Loading branch information
1 parent
11fe399
commit 0f543a2
Showing
12 changed files
with
83 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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