-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang module cache not being reused in darwin sandbox #1873
Comments
/cc @philwo for the general sandboxing things |
Generally, the clang module cache feature is at odds with sandboxing (it creates a shared global module cache in /tmp, so it assume non-hermetic compilation), so the slow down is fully expected; you're essentially doing quadratic work here (recompile all transitive modules on every compile step). For C++ modules builds, we are using explicit module builds, and we are modeling the module outputs (pcm files) within bazel. For Obj-C this has (as far as I undersatnd) yet to be done; I guess the main work will be to actually figure out how to pass framework modules to the build correctly when implicit module builds are disabled. |
Ok so reassigning to Objc for Objc / C++ interop /cc @calpeyser |
Will make a dup of #7527 which has more information. |
I noticed compiling to be significantly slower on versions of macOS where sandboxing is enabled (seems to not be enabled on macOS yet). The behavior described in
getCompileRuleCopts()
comments don't seem to be behaving.If I understand how the sandboxing works, it sym/hardlinks all the input files to a temp directory. If the directory specified for the module cache is in the genfiles dir, it seems like each file it compiles will get an empty directory as input. This causes it to reparse imported modules each time.
The text was updated successfully, but these errors were encountered: