Skip to content
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

Update README.md #1170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update README.md #1170

wants to merge 1 commit into from

Conversation

mominul
Copy link

@mominul mominul commented Dec 31, 2023

GCC doesn't accept a path as an argument to -fuse-ld. It errors out by

cc: error: unrecognized command-line option '-fuse-ld=/usr/bin/mold'

Passing -fuse-ld=mold is enough.

Tested with

gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6)

GCC doesn't accept a path as an argument to `-fuse-ld`. `-fuse-ld=mold` is enough.

Tested with
```
gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6)
```
@@ -143,7 +143,7 @@ may be able to remove the `linker = "clang"` line.

```toml
[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=/path/to/mold"]
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
Copy link

@pothos pothos May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that gcc doesn't support the path, hence I would change may be able to remove the 'linker = "clang"' line. to may be able to remove the 'linker = "clang"' line and change the '-fuse-ld=' setting to 'mold'., i.e., add and change the '-fuse-ld=' setting to 'mold'. to the before paragraph.
When one just reads the instructions it sounds like one would only remove that linker = "clang" line, so making it a bit more explicit would be nice. (I see that a few paragraphs before it is mentioned that GCC does not take an absolute path.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants