Skip to content

Conversation

@StephanTLavavej
Copy link
Member

Related to (and inspired by) #2141.

This will need some MSVC-internal changes, but the impact is surprisingly small.

  • In stl/CMakeLists.txt, we need to define _ENFORCE_ONLY_CORE_HEADERS when building the msvcp${D_SUFFIX}_implib_objects.
    • We don't want to modify the other place that the IMPLIB_SOURCES are mentioned - libcpmt${FLAVOR_SUFFIX} is the static lib.
  • nothrow.cpp was including <new>, a non-core header, but it can just include <vcruntime_new.h> which is where nothrow_t is actually defined.
    • We can keep _STD_BEGIN/_STD_END if we include <yvals_core.h>.
    • I'm dropping the useless // define nothrow comment.
  • locale0.cpp and <xfacet> are too difficult to untangle at this time. I'm just exempting them from this enforcement.

@StephanTLavavej StephanTLavavej added the build Related to the build system label Apr 4, 2023
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner April 4, 2023 08:24
@StephanTLavavej StephanTLavavej self-assigned this Apr 7, 2023
@StephanTLavavej
Copy link
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Copy link
Member Author

I've resolved a trivial adjacent-add conflict in stl/src/locale0.cpp by taking #2141's comment before this PR's #undef.

@StephanTLavavej StephanTLavavej merged commit 10f0c3a into microsoft:main Apr 7, 2023
@StephanTLavavej StephanTLavavej deleted the core-import-lib branch April 7, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Related to the build system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants