-
Notifications
You must be signed in to change notification settings - Fork 24
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
Forward preprocessor definitions to the remote compiler. #42
base: main
Are you sure you want to change the base?
Conversation
When doing partial local preprocessing, a remote clang compilation still needs the preprocessor definitions from the command line so that the remaining preprocessing can be performed correctly. Partial preprocessing is necessary to prevent the remote compiler issuing spurious warnings from macro expansion that would be suppressed in a local compilation. This means when spawning a compilation, we should always use either `LocalArgs` or `RemoteArgs`, and the need to separately preserve unknown arguments and conditionally restore preprocessor definitions goes away. This updates nelhage#37.
I haven't tested this with gcc, so it's possible that I've missed some compatibility implications, but it seems to me that it should always be safe to forward preprocessor definitions to the remove compiler. Worst case, they would just get ignored. 🤞 |
I think it's possible that this could break builds with |
Hm, this is breaking remote preprocessing because including all the arguments when detecting dependencies is problematic. e.g. it's very important that we strip any existing It also OOMs if I run it at wide parallelism -- and |
(When I get more time and energy to focus on Llama, it seems pretty clear to me that the next project is an integration test setup that runs the runtime inside a docker image and mocks out the Lambda invoke interface so we can actually test these things end-to-end in CI; there are just too many permutations to keep track of…) |
Oh, my intention here was to forward |
AFAICT
I added some info to #45. I think this is caused by transferring large preprocessed blobs over the net/rpc protocol, in which case I'd expect to see it whenever preprocessing is local. |
When doing partial local preprocessing, a remote clang compilation
still needs the preprocessor definitions from the command line so
that the remaining preprocessing can be performed correctly. Partial
preprocessing is necessary to prevent the remote compiler issuing
spurious warnings from macro expansion that would be suppressed in
a local compilation.
This means when spawning a compilation, we should always use either
LocalArgs
orRemoteArgs
, and the need to separately preserveunknown arguments and conditionally restore preprocessor definitions
goes away.
This updates #37.