Skip to content

[cpullvm] Set CC/CXX in the environment for Windows builds#317

Merged
jonathonpenix merged 1 commit into
qualcomm:qualcomm-softwarefrom
jonathonpenix:pr/windows_cc
Jun 1, 2026
Merged

[cpullvm] Set CC/CXX in the environment for Windows builds#317
jonathonpenix merged 1 commit into
qualcomm:qualcomm-softwarefrom
jonathonpenix:pr/windows_cc

Conversation

@jonathonpenix

Copy link
Copy Markdown
Contributor

There's a few different aims here:

  • Setting CMAKE_C_COMPILER, etc. directly can be a bit confusing when looking through our logs. That value is not propagated when we add multilib and the runtimes as external CMake projects so these projects report MSVC as CMAKE_C[XX]_COMPILER. We don't use MSVC in these subprojects (we manually pass in/use the just-built LLVM toolchain) so there shouldn't be any functional change here, but it should hopefully avoid confusion if/when people look through logs.

    So, I think it is best we avoid recommending this if we can.

  • This also aligns our Windows builds closer to what we recommend for Linux.

With this change, I think we can also consolidate our build instructions a bit to make them (hopefully) more clear/concise.

There's a few different aims here:
* Setting CMAKE_C_COMPILER, etc. directly can be a bit confusing when
  looking through our logs. That value is not propagated when we add
  multilib and the runtimes as external CMake projects so these projects
  report MSVC as CMAKE_C[XX]_COMPILER. We don't *use* MSVC in these
  subprojects (we manually pass in/use the just-built LLVM toolchain) so
  there shouldn't be any functional change here, but it should hopefully
  avoid confusion if/when people look through logs.

  So, I think it is best we avoid recommending this if we can.
* This also aligns our Windows builds closer to what we recommend for
  Linux.

With this change, I think we can also consolidate our build instructions
a bit to make them (hopefully) more clear/concise.

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
@jonathonpenix

Copy link
Copy Markdown
Contributor Author

Examples from our logs:

From one of our nightly runs:

[6053/6556] Performing configure step for 'multilib-picolibc'
-- The C compiler identification is MSVC 19.44.35225.0
-- The CXX compiler identification is MSVC 19.44.35225.0

From building with this change:

[6053/6556] Performing configure step for 'multilib-picolibc'
-- The C compiler identification is Clang 19.1.5 with MSVC-like command-line
-- The CXX compiler identification is Clang 19.1.5 with MSVC-like command-line

Again this is really a cosmetic change, but it makes us a bit more consistent/hopefully preempts some confusion around this.

@jonathonpenix

Copy link
Copy Markdown
Contributor Author

@apazos apazos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an issue only on Windows? I think users might be more familiar to setting -DCMAKE_C_COMPILER, -DCMAKE_CXX_COMPILER, so should we keep them and add a note about Windows?

@jonathonpenix

jonathonpenix commented Apr 17, 2026

Copy link
Copy Markdown
Contributor Author

It's not specific to Windows, it's just we already use CC/CXX on Linux in our build scripts, etc.

There isn't a particularly good reason why we weren't doing this on Windows before--it's just that when I was rushing through things I wasn't sure if CMake was consistent about this on Windows

I'm also not necessarily opposed to going through CMAKE_C_COMPILER (we can always pass this through to subprojects or something), but I think it's worth being consistent between whatever we recommend for Linux/Windows

@jonathonpenix jonathonpenix merged commit e8f000b into qualcomm:qualcomm-software Jun 1, 2026
14 of 17 checks passed
@jonathonpenix jonathonpenix deleted the pr/windows_cc branch June 1, 2026 22:45
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