Skip to content

rustc: Respect CC variable at runtime #18529

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

Closed
wants to merge 1 commit into from

Conversation

richo
Copy link
Contributor

@richo richo commented Nov 2, 2014

This really should be passed in either from sniffing CFG_CC during
configure, or with a --cc-program flag to the configure script, but an
escape hatch is required for platforms with nothing called `cc' on PATH.

This really should be passed in either from sniffing CFG_CC during
configure, or with a --cc-program flag to the configure script, but an
escape hatch is required for platforms with nothing called `cc' on PATH.
@luqmana
Copy link
Member

luqmana commented Nov 2, 2014

You can already override the default with the -C linker=foo flag so I don't think we need another way to do it.

@richo
Copy link
Contributor Author

richo commented Nov 2, 2014

Plausible. I think that docs in this area are definitely lacking though (this is the second time I've gone digging in rustc to implement an escape hatch for something I couldn't find the docs for)

@alexcrichton
Copy link
Member

I'm also a little hesitant to use this as we one day may move to something like LLVM's linker or to invoking ld directly in which case running gcc or using CC may not make as much sense.

@richo
Copy link
Contributor Author

richo commented Nov 3, 2014

tbc, the only reason I didn't close this is because I think the current system isn't very sustainable; not because I think this is necessarily a good/the right solution.

My biggest gripe is that the underlying mechanism is very opaque- and as end user trying to set CC in the controlling environment made a lot more sense than -C linker=foo which is buried only in the codegen options(?)

@steveklabnik
Copy link
Member

So, what's the call here?

@alexcrichton
Copy link
Member

@richo for now I think we're going to want to keep -C linker as is for now in order to keep the interface of the compiler under control. Note that cross compilation is a little tougher with general environment variables like CC leading to problems such as needing many environment variables.

For now I'm going to close this to help clear out @bors's queue, but we can certainly revisit this in the future if necessary!

lnicola added a commit to lnicola/rust that referenced this pull request Nov 28, 2024
…espace_in_merge_match_arms

Improve selection handling for the `merge_match_arms` assist
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.

4 participants