Comments (15)
If that's the case it is what it is. If linking is not the bottleneck of your build process, mold can't make it faster. Maybe your binary is relatively small?
from mold.
I am aware if the process I have done for configure the mold is right, the linking part normally spent over 1min to process on Intel(R) Xeon(R) Platinum 8360Y CPU @ 2.40GHz
in this case.
from mold.
What is the overall wallclock time to build the entire source tree? What if you change a single file and rebuild it?
from mold.
If change single file and rebuild it when RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold" cargo build --release
, it spent 34.20s/1m 11s
, 34.20s
is for change a single file and rebuild it, 1m 11s
is overall spend.
However, when pure perform cargo build --release
without any FLAGs, it spent the similar, 34.66s/1m 45s
.
When perform RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold -Z threads=32" cargo +nightly build --release
, 34.63s/1m 42s
Each build test after cargo clean
.
from mold.
You don't want to run cargo clean
after making a change to a file. Just change a single file and rebuild it, which is a typical scenario, and measure how much time does each build takes.
from mold.
As mentioned, 34.20s
, 34.66s
and 34.63s
are the time spent by change a single file and rebuild it
. So, wired is, the three build process make no different
from mold.
What if you do not change anything but just delete the generated executable and rebuild it?
from mold.
@rui314 as you request,
0.14s
for standardcargo build --release
0.14s
forRUSTFLAGS="-Z threads=32" cargo +nightly build --release
0.11s
forRUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold" cargo build --release
0.11s
forRUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold -Z threads=32" cargo +nightly build --release
from mold.
I'm not familiar with the rust build system, but aren't that the time the linkers take to link your program? If that's the case, the faster linker can't make any difference.
from mold.
it takes about 0.03s faster in this case. One more question, does mold compatible with https://github.com/rust-lang/rustc_codegen_cranelift
from mold.
Yes
from mold.
Related Issues (20)
- Error with `cargo build --release` on PPC64LE: Missing `R_PPC64_TPREL16_LO_DS` HOT 2
- Is -z x86-64-vX supported? HOT 2
- Fails to build LLVM 18.1.6 with mold HOT 3
- Corrupts the `DWARF` section when relocating multiple objects into a single one HOT 3
- Feature request: Warn about reverse or cyclic dependencies
- MSYS2/UCRT64: LINKER_TYPE 'MOLD' is unknown or not supported by this toolchain. HOT 6
- Build mold from source with -march or -mcpu in the build script HOT 2
- mold support for Fortran HOT 1
- Segmentation fault when compiling ROOT HOT 4
- /usr/lib/mold/mold-wrapper.so: unsupported relocation type 1026 HOT 3
- Binary linked with mold segfaults immediately HOT 5
- [FEATURE REQ/BUG REP] SH4 endianas HOT 7
- x86_64-exception-multiple-ehframe test failure HOT 2
- corrupted .riscv.attributes ISA string
- Very slow symbol lookup speed with gdb HOT 3
- mold fails to build on Debian sid on most of the archs (`error: implicit declaration of function`)
- Support `libdep` plugin HOT 8
- duplicate symbol of compiler_rt builtin functions HOT 16
- Reference counting of std::shared_ptr is non-atomic when using the mold linker HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mold.