Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build the import lib with _ENFORCE_ONLY_CORE_HEADERS #3621

Merged
merged 4 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ function(add_stl_dlls D_SUFFIX REL_OR_DBG)

# import library 'statics'
add_library(msvcp${D_SUFFIX}_implib_objects OBJECT ${IMPLIB_SOURCES})
target_compile_definitions(msvcp${D_SUFFIX}_implib_objects PRIVATE _DLL)
target_compile_definitions(msvcp${D_SUFFIX}_implib_objects PRIVATE _DLL _ENFORCE_ONLY_CORE_HEADERS)
target_compile_options(msvcp${D_SUFFIX}_implib_objects PRIVATE /EHsc) # No /GL!
target_stl_compile_options(msvcp${D_SUFFIX}_implib_objects ${REL_OR_DBG})

Expand Down
2 changes: 2 additions & 0 deletions stl/src/locale0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// class locale basic member functions

#undef _ENFORCE_ONLY_CORE_HEADERS // TRANSITION, <xfacet> should be a core header
StephanTLavavej marked this conversation as resolved.
Show resolved Hide resolved

#include <crtdbg.h>
#include <internal_shared.h>
#include <xatomic.h>
Expand Down
8 changes: 5 additions & 3 deletions stl/src/nothrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
#undef MRTDLL
#endif

#include <new>
_STD_BEGIN
#include <yvals_core.h>

#include <vcruntime_new.h>

const nothrow_t nothrow = nothrow_t(); // define nothrow
_STD_BEGIN
const nothrow_t nothrow = nothrow_t();
_STD_END