-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Build a complete sysroot in the cache directory #13090
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
Conversation
a3b8b06
to
5a7e77e
Compare
84f6e82
to
27b98cc
Compare
a532540
to
0fbd5b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what the overall change is to the cache? I see reconfiguring is not needed, but I'm not sure why. In other words, what does the cache look like after this change?
The reason reconfiguring if the cache is no longer necessary is that we no longer user separate cache directories for different configurations. Instead the cache directory is fixed and never changes, but the libraries being uses live in different sub-directories of the cache. Old layout:
New layout:
(not only one cache.lock exists because there is only ever one cache directory). If you like I can take the changes relating to removing reconfigurability and separate them out and land them first? Then we could have the same layout as today but all within a single structured cache directory. Would that make it easier to review and safer to land? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. Approach sgtm. The only possible downside is that before with separate cache dirs we could clear just one at a time, but I don't think we actually did that - we cleared it all. So I think this has no downsides, and only upsides.
If you like I can take the changes relating to removing reconfigurability and separate them out and land them first?
From a review point of view I'm fine either way. But that might make it safer to land, so it might be worth it.
One specific thing I worry about is our precompiled libraries support in the emsdk, which needs to be copied to the right place - I assume we'll need emsdk changes for this too?
This was split out from the change to use a single sysroot (#13090). I think it cleaner this way: There is single cache, with single lock file and the root doesn't change, but the libraries live in sub-directories within the cache.
This was split out from the change to use a single sysroot (#13090). I think it cleaner this way: There is single cache, with single lock file and the root doesn't change, but the libraries live in sub-directories within the cache.
This was split out from the change to use a single sysroot (#13090). I think it cleaner this way: There is single cache, with single lock file and the root doesn't change, but the libraries live in sub-directories within the cache.
This was split out from the change to use a single sysroot (#13090). I think it cleaner this way: There is single cache, with single lock file and the root doesn't change, but the libraries live in sub-directories within the cache.
This was split out from the change to use a single sysroot (#13090). I think it cleaner this way: There is single cache, with single lock file and the root doesn't change, but the libraries live in sub-directories within the cache.
This was split out from the change to use a single sysroot (#13090). I think it cleaner this way: There is single cache, with single lock file and the root doesn't change, but the libraries live in sub-directories within the cache.
0065f6a
to
356b56d
Compare
Rather than adding various include paths, copy any needed headers into the sysroot along with any libraries. This means that emscripten can work a lot more like the traditional cross compiler (e.g. clang -target=xxx --sysroot=yyy), and we can start to think of the emscripten driver as a seperate thing to the sysroot. Fixes: #9353
I believe after this change iterating work on system headers has become astronomically slower, as one needs to do Is there a way to get the old behavior back, or have a mode where one has fast access to iterating on system headers, which does not need either manual deployment of headers after each edit, or the process is somehow automated e.g. by checking timestamps on the source files? |
Yes I agree we could make it a little smoother. I've also forgotten to run |
By the way, this was already true when editing source files in the system directory. The developer has to know to run |
Is knowing about |
That is true. In this case I am working on WebGPU header and JS library files, where the .h files now need a embuilder build step, but looks like JS library files at least do not.
Yes, thanks, I can patch that in to my build cmdline for now. |
Rather than adding various include paths, copy any needed headers into
the sysroot along with any libraries.
This means that emscripten can work a lot more like the
traditional cross compiler (e.g. clang -target=xxx --sysroot=yyy),
and we can start to think of the emscripten driver as a seperate
thing to the sysroot.
Fixes: #9353