(cmake) fix default flags detection on windows platform#6619
Merged
waruqi merged 2 commits intoxmake-io:devfrom Jul 14, 2025
Merged
(cmake) fix default flags detection on windows platform#6619waruqi merged 2 commits intoxmake-io:devfrom
waruqi merged 2 commits intoxmake-io:devfrom
Conversation
dbc36fc to
77c1120
Compare
77c1120 to
5005dd9
Compare
waruqi
reviewed
Jul 12, 2025
| -- The default flags are different for different platforms | ||
| -- @see https://github.com/xmake-io/xmake-repo/pull/4038#issuecomment-2116489448 | ||
| local cachekey = buildtype .. package:plat() .. package:arch() | ||
| local cachekey = buildtype .. package:plat() .. package:arch() .. package:build_getenv("cc") .. package:build_getenv("cxx") |
Member
There was a problem hiding this comment.
local cc = package:build_getenv("cc")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when using llvm or clang toolchain on windows platform and using --sdk instead of having clang in PATH env var, xmake fail to get correct default c and cxx flags when installing a package using CMake, this patch fix it