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

Document environment variables used by programs rustc invokes underneath (linkers, etc) #84386

Open
boris-kolpackov opened this issue Apr 21, 2021 · 3 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@boris-kolpackov
Copy link

This is related to issue #16330: rustc invokes other programs underneath (most notably, a linker) which recognize environment variables of their own. A prominent example would be the LIB variable that is recognized by Microsoft link.exe (and lld-link) which is what, as I understand, is used by rustc on Windows.

Having an accurate list of environment variables that can affect the result of compilation is important to build systems that track changes to the environment.

@boris-kolpackov boris-kolpackov added the C-bug Category: This is a bug. label Apr 21, 2021
@boris-kolpackov
Copy link
Author

Another prominent example would be MACOSX_DEPLOYMENT_TARGET (and a slew of other *_DEPLOYMENT_TARGET variables) recognized by ld64 on Mac OS.

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed C-bug Category: This is a bug. labels Apr 21, 2021
@jonas-schievink
Copy link
Contributor

Since the environment variables used by the linker can vary depending on its version, the best way to do this would probably to link to the linker's documentation

@madsmtm
Copy link
Contributor

madsmtm commented Oct 31, 2024

The Apple-specific *_DEPLOYMENT_TARGET and SDKROOT were documented in #124772.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants