File tree Expand file tree Collapse file tree
include/.internal/winsdk/wdk/10.0.26100.0 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,10 +117,7 @@ jobs:
117117 strategy :
118118 fail-fast : false
119119 matrix :
120- # v142 is kept as an old-toolset smoke test. The windows-2022 hosted
121- # image mixes v142 ARM64 tasks with v170 marmasm targets, so ARM64 is
122- # covered by the main toolset matrix instead.
123- arch : [x64]
120+ arch : [x64, ARM64]
124121
125122 steps :
126123 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -214,8 +214,12 @@ endif()
214214#
215215# Forced Include File
216216#
217- if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR } /include/.internal/winsdk/${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} /wdk/${WDK_VERSION} /forced.h" )
218- target_compile_options (crtsys PRIVATE "$<$<COMPILE_LANGUAGE :C ,CXX >:/FI ${CMAKE_CURRENT_SOURCE_DIR } /include /.internal /winsdk /${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} /wdk /${WDK_VERSION} /forced .h >" )
217+ set (CRTSYS_WINSDK_FORCED_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR } /include/.internal/winsdk/${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} /wdk/${WDK_VERSION} /forced.h" )
218+ if (NOT EXISTS "${CRTSYS_WINSDK_FORCED_INCLUDE} " )
219+ set (CRTSYS_WINSDK_FORCED_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR } /include/.internal/winsdk/wdk/${WDK_VERSION} /forced.h" )
220+ endif ()
221+ if (EXISTS "${CRTSYS_WINSDK_FORCED_INCLUDE} " )
222+ target_compile_options (crtsys PRIVATE "$<$<COMPILE_LANGUAGE :C ,CXX >:/FI ${CRTSYS_WINSDK_FORCED_INCLUDE} >" )
219223endif ()
220224target_compile_options (crtsys PRIVATE "$<$<COMPILE_LANGUAGE :C ,CXX >:/FI ${CMAKE_CURRENT_SOURCE_DIR } /src /crtsys .h >" )
221225if (UCXXRT_ENABLED)
Original file line number Diff line number Diff line change @@ -173,8 +173,12 @@ function(crtsys_apply_driver_settings _target _root)
173173
174174 set_property (TARGET ${_target} PROPERTY INCLUDE_DIRECTORIES "${_root} /include;${_root} /include/.internal/msvc/$(VCToolsVersion);${_root} /include/.internal/msvc/${MSVC_TOOLSET_VERSION } ;${_root} /include/.internal/msvc/$(VCToolsVersion)/stl;${_root} /include/.internal/msvc/${MSVC_TOOLSET_VERSION } /stl;$(VC_IncludePath);$(WindowsSDK_IncludePath);${INC_DIR_TMP} " )
175175
176- if (EXISTS "${_root} /include/.internal/winsdk/${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} /wdk/${WDK_VERSION} /forced.h" )
177- target_compile_options (${_target} PRIVATE "$<$<COMPILE_LANGUAGE :C ,CXX >:/FI ${_root} /include /.internal /winsdk /${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} /wdk /${WDK_VERSION} /forced .h >" )
176+ set (_crtsys_winsdk_forced_include "${_root} /include/.internal/winsdk/${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} /wdk/${WDK_VERSION} /forced.h" )
177+ if (NOT EXISTS "${_crtsys_winsdk_forced_include} " )
178+ set (_crtsys_winsdk_forced_include "${_root} /include/.internal/winsdk/wdk/${WDK_VERSION} /forced.h" )
179+ endif ()
180+ if (EXISTS "${_crtsys_winsdk_forced_include} " )
181+ target_compile_options (${_target} PRIVATE "$<$<COMPILE_LANGUAGE :C ,CXX >:/FI ${_crtsys_winsdk_forced_include} >" )
178182 endif ()
179183
180184 target_compile_options (${_target} PRIVATE "$<$<COMPILE_LANGUAGE :C ,CXX >:/FI ${_root} /include /.internal /adjust_link_order >" )
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ //
4+ // WDK 10.0.26100.0 wdm.h uses _CountOneBits64 in ARM64 helper code before
5+ // older v142 ARM64 toolsets have necessarily seen the intrinsic declaration.
6+ // Force intrin.h first and provide the missing v142 declaration.
7+ //
8+ #include <intrin.h>
9+
10+ #if defined(_M_ARM64 ) && defined(_MSC_VER ) && _MSC_VER < 1930
11+ #ifdef __cplusplus
12+ extern "C" {
13+ #endif
14+ unsigned int __cdecl _CountOneBits64 (unsigned __int64 );
15+ #ifdef __cplusplus
16+ }
17+ #endif
18+ #endif
Original file line number Diff line number Diff line change 88
99#include <ntdef.h>
1010
11+ #if defined(_M_ARM64 ) && defined(_MSC_VER ) && _MSC_VER < 1930
12+ //
13+ // WDK 10.0.26100.0 wdm.h can reference _CountOneBits64 before the v142 ARM64
14+ // intrinsic declaration is visible. Keep this narrow compatibility declaration
15+ // ahead of any later WDK header include.
16+ //
17+ #ifdef __cplusplus
18+ extern "C" {
19+ #endif
20+ unsigned int __cdecl _CountOneBits64 (unsigned __int64 );
21+ #ifdef __cplusplus
22+ }
23+ #endif
24+ #endif
25+
1126#ifndef CRTSYS_ENABLE_DIAGNOSTIC_BREAKPOINTS
1227#define CRTSYS_ENABLE_DIAGNOSTIC_BREAKPOINTS 1
1328#endif
Original file line number Diff line number Diff line change 470470 <Platform_Arm Condition =" '$(Platform)'=='ARM' or '$(Platform)'=='ARM64'" >true</Platform_Arm >
471471 <Platform_Arm Condition =" '$(Platform_Arm)'!='true'" >false</Platform_Arm >
472472 <Platform_Intel >!$(Platform_Arm)</Platform_Intel >
473+ <CrtSysMarmasmBuildCustomizationsPath >$(VCTargetsPath)\BuildCustomizations</CrtSysMarmasmBuildCustomizationsPath >
474+ <CrtSysMarmasmBuildCustomizationsPath Condition =" '$(PlatformToolset)'=='v142' or '$(PlatformToolsetVersion)'=='142'" >$(VCTargetsPath)\..\v160\BuildCustomizations</CrtSysMarmasmBuildCustomizationsPath >
473475 </PropertyGroup >
474476
475477 <ImportGroup >
476- <Import Condition =" $(Platform_Arm)" Project =" $(VCTargetsPath)\BuildCustomizations \marmasm.props" />
478+ <Import Condition =" $(Platform_Arm)" Project =" $(CrtSysMarmasmBuildCustomizationsPath) \marmasm.props" />
477479 </ImportGroup >
478480
479481 <Target Name =" PreprocessArmHandlers" Condition =" '$(Platform)'=='ARM'" BeforeTargets =" _MARMASM" Outputs =" $(IntDir)handlers.pp" Inputs =" $(VC_CRT_SourcePath.Split(%3B)[0])\arm\handlers.asm" >
510512 </ItemGroup >
511513
512514 <ImportGroup >
513- <Import Condition =" $(Platform_Arm)" Project =" $(VCTargetsPath)\BuildCustomizations \marmasm.targets" />
515+ <Import Condition =" $(Platform_Arm)" Project =" $(CrtSysMarmasmBuildCustomizationsPath) \marmasm.targets" />
514516 </ImportGroup >
515- </Project >
517+ </Project >
Original file line number Diff line number Diff line change 269269 <Platform_Arm Condition =" '$(Platform)'=='ARM' or '$(Platform)'=='ARM64'" >true</Platform_Arm >
270270 <Platform_Arm Condition =" '$(Platform_Arm)'!='true'" >false</Platform_Arm >
271271 <Platform_Intel >!$(Platform_Arm)</Platform_Intel >
272+ <CrtSysMarmasmBuildCustomizationsPath >$(VCTargetsPath)\BuildCustomizations</CrtSysMarmasmBuildCustomizationsPath >
273+ <CrtSysMarmasmBuildCustomizationsPath Condition =" '$(PlatformToolset)'=='v142' or '$(PlatformToolsetVersion)'=='142'" >$(VCTargetsPath)\..\v160\BuildCustomizations</CrtSysMarmasmBuildCustomizationsPath >
272274 </PropertyGroup >
273275
274276 <ImportGroup >
275- <Import Condition =" $(Platform_Arm)" Project =" $(VCTargetsPath)\BuildCustomizations \marmasm.props" />
277+ <Import Condition =" $(Platform_Arm)" Project =" $(CrtSysMarmasmBuildCustomizationsPath) \marmasm.props" />
276278 </ImportGroup >
277279
278280 <ItemGroup Condition =" '$(Platform)'=='Win32'" >
321323 </ItemGroup >
322324
323325 <ImportGroup >
324- <Import Condition =" $(Platform_Arm)" Project =" $(VCTargetsPath)\BuildCustomizations \marmasm.targets" />
326+ <Import Condition =" $(Platform_Arm)" Project =" $(CrtSysMarmasmBuildCustomizationsPath) \marmasm.targets" />
325327 </ImportGroup >
326328</Project >
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ endif()
5454
5555crtsys_add_driver (crtsys_test ${SOURCE_FILES} )
5656target_compile_options (crtsys_test PRIVATE "$<$<COMPILE_LANGUAGE :CXX >:/GR >" )
57+ # Keep cppreference examples such as std::fopen intact while building the
58+ # driver test harness with /WX under older MSVC toolsets.
59+ target_compile_definitions (crtsys_test PRIVATE "_CRT_SECURE_NO_WARNINGS" )
5760
5861if (NOT CRTSYS_TEST_BREAKPOINT)
5962 target_compile_definitions (crtsys_test PRIVATE "CRTSYS_TEST_NO_BREAKPOINT" )
Original file line number Diff line number Diff line change 1- #define _CRT_SECURE_NO_WARNINGS
2-
31//
42// https://en.cppreference.com/w/cpp/memory/shared_ptr#Example
53//
Original file line number Diff line number Diff line change 7171 <RuntimeTypeInfo >true</RuntimeTypeInfo >
7272 <LanguageStandard >stdcpplatest</LanguageStandard >
7373 <AdditionalIncludeDirectories >$(MSBuildThisFileDirectory);$(MSBuildThisFileDirectory)..\cmake;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories >
74- <PreprocessorDefinitions >CRTSYS_TEST_NO_BREAKPOINT;CRTSYS_TEST_NLOHMANN_JSON;%(PreprocessorDefinitions)</PreprocessorDefinitions >
74+ <PreprocessorDefinitions >CRTSYS_TEST_NO_BREAKPOINT;CRTSYS_TEST_NLOHMANN_JSON;_CRT_SECURE_NO_WARNINGS; %(PreprocessorDefinitions)</PreprocessorDefinitions >
7575 </ClCompile >
7676 </ItemDefinitionGroup >
7777 <ItemGroup >
You can’t perform that action at this time.
0 commit comments