Skip to content

[CMake] Fix MSVC /bigobj flags for bsl and bdlar - #320

Open
hemv-857 wants to merge 2 commits into
bloomberg:mainfrom
hemv-857:fix/cmake-msvc-bigobj
Open

hemv-857 wants to merge 2 commits into
bloomberg:mainfrom
hemv-857:fix/cmake-msvc-bigobj

Conversation

@hemv-857

@hemv-857 hemv-857 commented Oct 23, 2026 •

Copy link
Copy Markdown

#6045 landed the bsl compiler-id fix and added bdlar INTERFACE /bigobj. This PR now carries the remaining piece: bdlar-iface is the OBJECT library that compiles bdlar_symbolicconverter.cpp, and an INTERFACE option on bdlar does not reach it. Add /bigobj directly to bdlar-iface, matching the existing bdlde-iface compile options.

Why the bdlar flag is not enough

bbs_setup_target_uor creates:

  • bdlar-iface as the OBJECT library with the package sources
  • bdlar as a STATIC library with no sources, linked PUBLIC bdlar-iface
  • the bdl group links bdlar-iface directly

target_compile_options(bdlar INTERFACE ...) propagates to targets that link bdlar, but not to bdlar-iface, whose sources are already compiled. The C1128 failure from #312 happens while compiling bdlar_symbolicconverter.cpp into bdlar-iface, so the object target needs the option.

Testing

  • cmake -S . -B _build succeeds.
  • cmake --build _build --target bdlar succeeds, including bdlar_symbolicconverter.cpp.
  • No MSVC toolchain is available locally, so the MSVC branch could not be built; the change only adds a flag inside the existing CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" block.

groups/bsl/CMakeLists.txt tested CXX_COMPILER_ID, which is not a CMake variable, so the MSVC branch never ran and the /bigobj options for bslma, bslstl and bsltf were never applied. Use CMAKE_CXX_COMPILER_ID, as the sibling bal and bdl files do.

bdlar_symbolicconverter.cpp needs /bigobj on MSVC when BDE is built without the bde-tools toolchain (see bloomberg#312). The existing bdl flags only cover test drivers (bdlf, bdlcc); apply /bigobj to bdlar's object library as well.
Copilot AI balanced review requested due to automatic review settings October 23, 2026 16:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

#6045 already fixed the bsl compiler-id typo and added an INTERFACE
/bigobj on bdlar. Keep that and add the missing flag to bdlar-iface,
the object library that compiles bdlar_symbolicconverter.cpp.

This branch has not been deployed

No deployments
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