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

Add custom CC wrapper to the wrapper whitelist #1175

Merged
merged 1 commit into from
Aug 11, 2024

Conversation

hodrob84
Copy link
Contributor

@hodrob84 hodrob84 commented Aug 8, 2024

Some toolchains use custom (or at least not widely used) CC wrappers, and passes that through the CC env var before the compiler, like:

CC = <custom_wrapper> -gcc

Add support to CC_KNOWN_WRAPPER_CUSTOM env var, to be able to extend the 'known_wrappers' list with this <custom_wrapper>, and handle these special cases.

Some toolchains use custom (or at least not widely used) CC wrappers,
and passes that through the CC env var before the compiler, like:

  CC = <custom_wrapper> <something>-gcc

Add support to CC_KNOWN_WRAPPER_CUSTOM env var, to be able to extend the
'known_wrappers' list with this <custom_wrapper>, and handle these
special cases.
@NobodyXu
Copy link
Collaborator

Thanks for the PR!

Can you please list some of the wrappers used?

If it is often used we can just add to our pre-defined list.

@hodrob84
Copy link
Contributor Author

This is 'ucfront-gcc' in my case. I just wanted to avoid to pollute it with a less commonly used one, and add something to make it easier to fit to one's purpose.

@NobodyXu
Copy link
Collaborator

Thanks, is passing CC=ucfront-gcc not enough?

I.e., our compiler detection doesn't work?

If the compiler detection doesn't work for ucfront-gcc, then I think we should fix the detection logic instead.

AFAIK ucfront-gcc in debian usually means gcc for a specific target/libc or other config, so it should have the same kinds of behavior as gcc.

@hodrob84
Copy link
Contributor Author

Sorry, I wasn't clear. That's just the wrapper. The passed CC is:
CC=ucfront-gcc <arch>-gcc

@NobodyXu
Copy link
Collaborator

In this case, I does think it makes sense.

Cc @thomcc does it LGTY?

@thomcc
Copy link
Member

thomcc commented Aug 10, 2024

I don't see a problem with this.

@NobodyXu
Copy link
Collaborator

Thanks, I'll merge it in then

@NobodyXu NobodyXu merged commit 7858d38 into rust-lang:main Aug 11, 2024
26 checks passed
@github-actions github-actions bot mentioned this pull request Aug 11, 2024
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