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

-d:lto doesn't work on OSX: invalid linker name in argument '-fuse-ld=lld'; + other issues with -d:lto #15578

Closed
timotheecour opened this issue Oct 14, 2020 · 3 comments

Comments

@timotheecour
Copy link
Member

timotheecour commented Oct 14, 2020

  • -d:lto doesn't work on OSX: invalid linker name in argument '-fuse-ld=lld'
  • -d:lto should be renamed to -d:nimlto to avoid clashes with user/3rd party packages
  • -d:lto isn't documented in https://nim-lang.github.io/Nim/nimc.html (reason more to rename to -d:nimlto)

Example

echo 'echo 1' | nim r -d:lto -

Current Output

clang: error: invalid linker name in argument '-fuse-ld=lld'
Error: execution of an external program failed: 'clang   -o /Users/timothee/.cache/nim/stdinfile_d/stdinfile  /Users/timothee/.cache/nim/stdinfile_d/stdlib_io.nim.c.o /Users/timothee/.cache/nim/stdinfile_d/stdlib_system.nim.c.o /Users/timothee/.cache/nim/stdinfile_d/@mstdinfile.nim.c.o    -ldl -fuse-ld=lld -flto'

Expected Output

works

Additional Information

questions

  • is --passl:-flto actually needed or just --passc:-flto? at least on some tests, only --passc:-flto seemed to matter
@juancarlospaco
Copy link
Collaborator

@ghost
Copy link

ghost commented Oct 15, 2020

@juancarlospaco not sure how that is related, but thanks for the link :)

@ghost
Copy link

ghost commented Oct 15, 2020

@timotheecour I actually got the same error if you check that PR - #14013 (comment)

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

Successfully merging a pull request may close this issue.

2 participants