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: pass CMAKE_C/CXX_COMPILER to all stages #3080

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Vtec234
Copy link
Member

@Vtec234 Vtec234 commented Dec 16, 2023

Summary

This PR fixes #2863, making a guess as to how that should be done. We replace the if/else/else with if/else;if so that CMAKE_C/CXX_COMPILER is stored both in PLATFORM_ARGS and CL_ARGS and consequently passed to all stages. I am not sure what the original intent of the logic was, but the comment below makes it sound like this was indeed a bug.

# Use standard release build (discarding LEAN_CXX_EXTRA_FLAGS etc.) for stage0 by default since it is assumed to be "good", but still pass through CMake platform arguments (compiler, toolchain file, ..).

Link to RFC or bug issue: #2863

@Vtec234 Vtec234 requested a review from Kha December 16, 2023 16:12
@Vtec234 Vtec234 added the awaiting-review Waiting for someone to review the PR label Dec 16, 2023
@Vtec234
Copy link
Member Author

Vtec234 commented Dec 16, 2023

Hm, it looks like the CI build actually sets CMAKE_C_COMPILER to a custom LLVM under stage1/bin. Before this PR, the stage0 build was still using the system compiler instead of that. Perhaps this PR is the wrong approach and people should just use STAGE0_CMAKE_C_COMPILER explicitly.

@Kha
Copy link
Member

Kha commented Dec 18, 2023

We can switch to STAGE0_CMAKE_C_COMPILER=cc in CI, though I'm actually not sure why that's necessary - we shouldn't be forwarding -nostdinc in this case.

@Kha
Copy link
Member

Kha commented Sep 27, 2024

We can switch to STAGE0_CMAKE_C_COMPILER=cc in CI

This would likely be the way to go but the PR should be changed to only forward *_COMPILER not any other options

@Kha Kha added awaiting-author Waiting for PR author to address issues and removed awaiting-review Waiting for someone to review the PR labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author Waiting for PR author to address issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cmake] Some command line arguments not persisting to stage0 step
2 participants