Skip to content

Commit 535efdf

Browse files
authored
build: re-enable msvc-asan job on CI (libuv#4289)
1 parent f98516d commit 535efdf

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

.github/workflows/CI-win.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,12 @@ jobs:
2525
- {toolchain: Visual Studio 16 2019, arch: x64, server: 2019}
2626
- {toolchain: Visual Studio 17 2022, arch: Win32, server: 2022}
2727
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022}
28-
# Currently broken, see https://github.com/libuv/libuv/issues/4210
29-
#- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: ASAN}
28+
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: ASAN}
3029
- {toolchain: Visual Studio 17 2022, arch: x64, server: 2022, config: UBSAN}
3130
- {toolchain: Visual Studio 17 2022, arch: arm64, server: 2022}
3231
steps:
3332
- uses: actions/checkout@v2
34-
- name: Envinfo
35-
run: npx envinfo
3633
- name: Build
37-
shell: cmd
3834
run:
3935
cmake -S . -B build -DBUILD_TESTING=ON
4036
-G "${{ matrix.config.toolchain }}" -A ${{ matrix.config.arch }}
@@ -43,17 +39,23 @@ jobs:
4339

4440
cmake --build build --config RelWithDebInfo
4541

42+
${{ matrix.config.config == 'ASAN' && 'Copy-Item -Path "build\\*.exe" -Destination "build\\RelWithDebInfo\\"' || '' }}
43+
44+
${{ matrix.config.config == 'ASAN' && 'Copy-Item -Path "build\\*.dll" -Destination "build\\RelWithDebInfo\\"' || '' }}
45+
4646
ls -l build
47-
- name: platform_output
47+
48+
ls -l build\\RelWithDebInfo
49+
- name: platform_output_a
4850
if: ${{ matrix.config.arch != 'arm64' }}
4951
shell: cmd
5052
run:
51-
build\\RelWithDebInfo\\uv_run_tests.exe platform_output
52-
- name: platform_output_a
53+
build\\RelWithDebInfo\\uv_run_tests_a.exe platform_output
54+
- name: platform_output
5355
if: ${{ matrix.config.arch != 'arm64' }}
5456
shell: cmd
5557
run:
56-
build\\RelWithDebInfo\\uv_run_tests_a.exe platform_output
58+
build\\RelWithDebInfo\\uv_run_tests.exe platform_output
5759
- name: Test
5860
# only valid with libuv-master with the fix for
5961
# https://github.com/libuv/leps/blob/master/005-windows-handles-not-fd.md

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,12 @@ endif()
767767

768768
if(MSVC)
769769
set(CMAKE_DEBUG_POSTFIX d)
770+
get_filename_component(CMAKE_C_COMPILER_DIR ${CMAKE_C_COMPILER} DIRECTORY)
771+
if(ASAN)
772+
file(INSTALL "${CMAKE_C_COMPILER_DIR}/llvm-symbolizer.exe" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
773+
file(INSTALL "${CMAKE_C_COMPILER_DIR}/clang_rt.asan_dynamic-x86_64.dll" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
774+
file(INSTALL "${CMAKE_C_COMPILER_DIR}/clang_rt.asan_dbg_dynamic-x86_64.dll" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
775+
endif()
770776
endif()
771777

772778
message(STATUS "summary of build options:

0 commit comments

Comments
 (0)