Build the import lib with `_ENFORCE_ONLY_CORE_HEADERS` (#3621)

This commit is contained in:
Stephan T. Lavavej 2023-04-07 12:25:41 -07:00 коммит произвёл GitHub
Родитель 8a652e62ac
Коммит 10f0c3a06d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -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})

Просмотреть файл

@ -7,6 +7,8 @@
// MAJOR LIMITATIONS apply to what can be included here!
// Before editing this file, read: /docs/import_library.md
#undef _ENFORCE_ONLY_CORE_HEADERS // TRANSITION, <xfacet> should be a core header
#include <crtdbg.h>
#include <internal_shared.h>
#include <xatomic.h>

Просмотреть файл

@ -11,8 +11,10 @@
#undef MRTDLL
#endif
#include <new>
_STD_BEGIN
#include <yvals_core.h>
const nothrow_t nothrow = nothrow_t(); // define nothrow
#include <vcruntime_new.h>
_STD_BEGIN
const nothrow_t nothrow = nothrow_t();
_STD_END