-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support setting "-C linker=" for rustc #1109
Comments
This is currently possible today via |
Mea culpa. Missed that whole page and just read the guide and the manifest docs. |
For anyone else who doesn't read the documentation properly, the eg:
|
Isn't that rather error prone? |
How do I find my target triple? |
@rightfold if you run |
Thanks! 😃
Sent from my iPhone.
… Op 12 feb. 2017 om 06:26 heeft Alex Crichton ***@***.***> het volgende geschreven:
@rightfold if you run rustc -vV it'll tell you the default target that you compile for (under host), otherwise you're passing --target in which case that's the target triple.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Is there any way to set the linker via an environment variable or |
@jeroen you should be able to set configuration via env vars |
@alexcrichton what environment variable would I use to set the |
Or just in general can I set the linker for the current cargo build (any target) with an environment variable? I tried:
But none had the same effect as a
|
@jeroen you'd use |
Thanks @alexcrichton! Now I am stuck on one final issue: We use a version of mingw-builds that was compiled with Currently when I try to build imageoptim-sys the linker fails because it can't find The cmake folks have a similar topic about not linking to |
@jeroen ah unforutnately you can't change that right now, so the only recourse would be to write a wrapper script that translates |
For anyone who stumbles into this thread looking for an answer that doesn't involve RUSTFLAGS="-C linker=/path/to/linker" cargo run ... |
|
Some cross compilation tools have prefixes in their name and path, for example the armel linker on Debian is /usr/bin/arm-linux-gnueabi-gcc. Cross compile targets would need a way to specify -C linker for rustc in the manifest.
The text was updated successfully, but these errors were encountered: