rustbuild: Build jemalloc and libbacktrace only once (take 2)#39329
rustbuild: Build jemalloc and libbacktrace only once (take 2)#39329bors merged 4 commits intorust-lang:masterfrom
Conversation
src/liballoc_jemalloc/build.rs
Outdated
There was a problem hiding this comment.
Yeah I believe you're right in that this may break cross compiles. Perhaps !cfg!(stage0) && some_stamp_file.exists() could be checked here? That "stamp" file could be created at the end of the build.
|
☔ The latest upstream changes (presumably #39252) made this pull request unmergeable. Please resolve the merge conflicts. |
This is exactly what I want to avoid - redoing The best solution is what the previous PR does - running |
|
Yeah |
Restored the solution from #38583, it's automatically correct regardless of rustbuild configuration or cross-compilation intricacies. |
|
@petrochenkov I've mentioned before though that this approach is empirically incorrect? For a number of reasons:
|
|
Ok, those are valid reasons. I'll have to move |
Actually, nevermind. This is still much faster than building libbacktrace and jemalloc. |
|
@bors: r+ Looks great, thanks! |
|
📌 Commit 0e41f13 has been approved by |
|
⌛ Testing commit 0e41f13 with merge f6ce61b... |
|
💔 Test failed - status-travis |
Hm, is this spurious or not? |
|
Nah I think that's a correct error, adding a new dependency here change the dependency graph. You can fix this though by appending |
|
@bors r=alexcrichton |
|
📌 Commit b4abb72 has been approved by |
rustbuild: Build jemalloc and libbacktrace only once (take 2) This is a rebase of #38583 without any additions, but with implemented @alexcrichton's suggestions. ~~This includes `exists(Makefile)` => `cfg(stage0)` suggestion... but it will break cross-compilation, no? Are `libstd/liballoc_jemalloc` cross-compiled for `target != host` built during `stage0`?~~ r? @alexcrichton
|
☀️ Test successful - status-appveyor, status-travis |
This is a rebase of #38583 without any additions, but with implemented @alexcrichton's suggestions.
This includesexists(Makefile)=>cfg(stage0)suggestion... but it will break cross-compilation, no? Arelibstd/liballoc_jemalloccross-compiled fortarget != hostbuilt duringstage0?r? @alexcrichton