Comments (4)
That works! Thanks!
from mold.
Could you try setting linker
to just ld
?
linker = "ld"
I believe the above configuration won't work as well, because linker
should be set to a compiler driver (e.g. gcc
or clang
) instead of a linker command itself (e.g. ld
or mold
).
If you undo your changes to use mold and instead run cargo build
as mold -run cargo build
, does that work? If a build command is run as mold -run <command>
, all invocations of /usr/bin/ld, /usr/bin/ld.gold or /usr/bin/ld.lld are replaced with mold.
from mold.
Hmm, with
[target.x86_64-unknown-linux-gnu]
rustflags = [
"-C", "link-arg=-L/usr/lib",
]
linker = "ld"
and running mold -run cargo run
I get the same
= note: mold: library not found: gcc
error.
The ld
/mold
command that's run seems to be the same.
from mold.
Please remove rustflags
and linker
from ~/.cargo/config
and run mold -run cargo run
. In other words, you don't have to edit your cargo config file to use mold. Just run mold -run cargo run
without changing any config file.
Generally, linker
in a cargo config file is expected to set to gcc
or clang
. If you set it to ld
, lld
or anything else, that will fail.
from mold.
Related Issues (20)
- Binaries linked with mold-2.30.0 randomly either work or crash in `_dl_relocate_object` HOT 4
- Fold sold back into mold? HOT 1
- arm-arm_abs-error failed: sorry, unimplemented: Thumb-1 'hard-float' VFP ABI HOT 3
- `mold 2.31.0` build failure when targeting `ARMv6` HOT 3
- retain, used and perhaps wildcard-matching using retain-symbols-file HOT 13
- Missing -z option rodynamic HOT 1
- riscv64-shared-abs-sym fails with 2.31.0 HOT 2
- Statically linked binaries crash with illegal hardware instructions HOT 7
- Cannot build project using tealr and Mold linker HOT 2
- `mold/third-party/mimalloc` can be bumped to `v2.1.6`
- Dependency file has references to temporary file HOT 8
- mold: fatal: unknown command line option: -arch HOT 1
- ninja error "FindFirstFileExA" during build on windows with vs2022 HOT 1
- 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
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.