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

Fix gmake/gmake2 action mixing up compilers #2240

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

tritao
Copy link
Contributor

@tritao tritao commented Sep 1, 2024

Due to Make behavior, specifically its default values to the CC and CXX implicit rules, we could end up in a scenario where the gcc and clang compilers would be used in the same project.

Be more explicit and do not rely on using the system default compilers, and use the gcc and g++ compilers explicitly.

Fixes #2207.

@tritao tritao force-pushed the fix-default-gcc-toolset branch from 053dc78 to 14fd9d3 Compare September 1, 2024 14:21
@tritao
Copy link
Contributor Author

tritao commented Sep 1, 2024

By the way, this mix up of compilers manifests itself in practice as some real weird debugging interactions, in my case with LLDB (not sure if GDB is the same case). Some breakpoints would not get it, its really annoying to encounter and figure out whats going on.

src/tools/gcc.lua Outdated Show resolved Hide resolved
@tritao tritao force-pushed the fix-default-gcc-toolset branch from 14fd9d3 to c2a9b67 Compare September 2, 2024 10:40
@tritao
Copy link
Contributor Author

tritao commented Sep 2, 2024

Updated with review feedback addressed.

@tritao tritao changed the title Fix gmake/gmake2 action mixing up compilers from different toolsets. Fix gmake/gmake2 action mixing up compilers Sep 2, 2024
Due to Make behavior, specifically its default values to the CC and CXX
implicit rules, we could end up in a scenario where the gcc and clang
compilers would be used in the same project.

Be more explicit and do not rely on using the system default compilers,
and use the gcc and g++ compilers explicitly.
@tritao tritao force-pushed the fix-default-gcc-toolset branch from c2a9b67 to fc95dde Compare September 5, 2024 14:19
@tritao
Copy link
Contributor Author

tritao commented Sep 5, 2024

Updated the PR with latest feedback.

@nickclark2016 nickclark2016 merged commit 9a70afe into premake:master Sep 11, 2024
12 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.

Premake system toolset selection issue
3 participants