diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c2baa37..3713afc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -60,10 +60,16 @@ jobs: - Release buildPreset: - windows-msvc-x64 + - windows-msvc-x64+asan - windows-msvc-x86 - windows-msvc-arm64 - windows-clang-x64 + - windows-clang-x64+asan - windows-clangcl-x64 + - windows-clangcl-x64+asan + exclude: + - buildPreset: windows-clangcl-x64+asan # ASan not supported with clangcl on Debug builds. + configuration: Debug runs-on: windows-latest steps: - name: Checkout diff --git a/WindowsCMake/Asan.cmake b/WindowsCMake/Asan.cmake index f4bc3ed..ba7f46b 100644 --- a/WindowsCMake/Asan.cmake +++ b/WindowsCMake/Asan.cmake @@ -50,8 +50,11 @@ function(windowscmake_add_asan_target) set(ASAN_PLATFORM i386) endif() + # When specifying the ASAN_DLL_PATH, the DLL is available in the _host_ architecture folder for the architecture + # being targeted - as a result `Host${CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE}` is used, and *not* + # `Host${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}` set(ASAN_LIB_PATH "${VS_TOOLSET_PATH}/lib/${CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE}") - set(ASAN_DLL_PATH "${VS_TOOLSET_PATH}/bin/Host${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}/${CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE}") + set(ASAN_DLL_PATH "${VS_TOOLSET_PATH}/bin/Host${CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE}/${CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE}") if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_C_COMPILER_ID STREQUAL "MSVC")) set(ASAN_LIB "${ASAN_LIB_PATH}/VCAsan.lib")