Skip to content

Conversation

@thomas-roos
Copy link
Member

Allow cc crate to use the default compiler from environment instead of forcing clang.

This change improves build system flexibility by:

  • Allowing users to use their preferred compiler (gcc, clang, etc.)
  • Respecting environment variables like CC
  • Supporting cross-compilation scenarios where a specific compiler is required
  • Maintaining compatibility with existing clang-based builds

The cc crate will automatically detect and use the appropriate compiler based on the build environment.

@thomas-roos thomas-roos requested a review from archigup November 25, 2025 13:03
@archigup
Copy link
Member

Yes but not using clang breaks cross-lang LTO. LTO can't be used across compilers

@archigup
Copy link
Member

hmm, probably fine if it can be overridden

Allow cc crate to use the default compiler from environment instead of
forcing clang. This improves build system flexibility and allows users
to use their preferred compiler (gcc, clang, etc.) based on their
environment configuration.
@thomas-roos thomas-roos force-pushed the remove-hardcoded-clang branch from 4ceaf76 to c223fc3 Compare November 26, 2025 08:31
@thomas-roos thomas-roos enabled auto-merge (rebase) November 26, 2025 08:34
@thomas-roos thomas-roos merged commit b3b6b2e into aws-greengrass:main Nov 26, 2025
19 checks passed
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.

2 participants