Skip to content

Use canonical CMake build type names in native builds - #138121

Merged
akoeplinger merged 1 commit into
mainfrom
akoeplinger-fix-cmake-build-type-casing
Nov 24, 2026
Merged

akoeplinger merged 1 commit into
mainfrom
akoeplinger-fix-cmake-build-type-casing

Conversation

@akoeplinger

@akoeplinger akoeplinger commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #138038, where an uppercase CMAKE_BUILD_TYPE exposed a case-sensitive comparison in the Apple crypto Swift build.

  • Have build-commons.sh pass the canonical build type explicitly. Both generator wrappers now forward -DCMAKE_BUILD_TYPE unchanged.
  • Share the case-insensitive comparison value and canonical cache choices across single-config generators. Make Rollup use the same case-insensitive Release check for its configuration and optimization mode.
  • Install the IJW test Debug CRT based on the configuration being installed, rather than the configure-time build type.

Built and linked System.Security.Cryptography.Native.Apple locally with Ninja on macOS arm64 in both Debug and Release. The verbose build confirmed swiftc -Onone for Debug and swiftc -O for Release.

Focused CMake checks covered argument forwarding and overrides, mixed-case native library optimization flags, and Debug-only CRT installation with Ninja and Ninja Multi-Config. The unmodified zstd target built with the canonical Debug value, and a Node smoke check covered mixed-case Rollup settings. A native Windows IJW build was not run.

Note

This description was generated with GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copilot AI 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.

🟡 Changes recommended

The changes break Unix Ninja Multi-Config native-library configuration with an undefined build-type variable and omit required debug CRT dependencies from Checked IJW installations.

2 open issues
What changed in this PR

This PR standardizes native build configuration names, following the Apple Swift casing issue in #138038, while preserving case-insensitive configuration checks.

Changes:

  • Pass canonical build types explicitly from the shared build script through the shell generator wrapper.
  • Centralize CMake configuration normalization and align Rollup’s configuration and optimization selection.
  • Select IJW debug CRT installation dependencies using the configuration being installed.
File Description
src/​native/​rollup.config.defines.js Share one case-insensitive Release check.
src/​native/​libs/​CMakeLists.txt Reuse shared normalization and clarify supported build types.
src/​native/​corehost/​test/​ijw/​CMakeLists.txt Filter debug CRT installation by install configuration.
eng/​native/​gen-buildsys.sh Forward explicit build-type arguments unchanged.
eng/​native/​configurecompiler.cmake Centralize canonical cache choices and uppercase normalization.
eng/​native/​build-commons.sh Pass the canonical build type explicitly to CMake.

Review effort: Balanced

Comment thread eng/native/configurecompiler.cmake Resolved
@akoeplinger
akoeplinger force-pushed the akoeplinger-fix-cmake-build-type-casing branch from 4c9a88a to 20690d0 Compare November 23, 2026 11:43
@akoeplinger
akoeplinger requested a balanced review from Copilot November 23, 2026 11:43

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the native build configuration normalization changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@akoeplinger
akoeplinger merged commit 1d3483c into main Nov 24, 2026
110 checks passed
@akoeplinger
akoeplinger deleted the akoeplinger-fix-cmake-build-type-casing branch November 24, 2026 09:29
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants