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

How to pass flags to the compiler in separate linking step #1431

Closed
JohanEngelen opened this issue Mar 30, 2018 · 1 comment
Closed

How to pass flags to the compiler in separate linking step #1431

JohanEngelen opened this issue Mar 30, 2018 · 1 comment

Comments

@JohanEngelen
Copy link

Issue discussed here:
https://forum.dlang.org/post/ctsitjonhqinnuyilgds@forum.dlang.org

When compilation and linking are separate:

  • compilation step: dflags is passed to the compiler
  • linking step: lflags is prefixed with -L and then passed to the compiler

How to pass a flag to the compiler during linking without the -L prefix?
This is needed for example for -flto=... and -fsanitize=... with LDC.

(note that separate linking is not implemented for LDC (#809), but it is possible when ldmd2 is used as is done in the forum thread)

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

No branches or pull requests

3 participants