From 090e9c8c1392a31b042c005753840761375012d7 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sun, 8 Sep 2024 04:36:57 +0000 Subject: [PATCH 1/2] Fix a typo in a call of install path getter function name This is a follow-up fix to f078f7af1e5 that I made at the last minute before merging... --- Sources/_TestingInternals/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/_TestingInternals/CMakeLists.txt b/Sources/_TestingInternals/CMakeLists.txt index e33faeecf..923450b51 100644 --- a/Sources/_TestingInternals/CMakeLists.txt +++ b/Sources/_TestingInternals/CMakeLists.txt @@ -22,7 +22,7 @@ if(NOT BUILD_SHARED_LIBS) # When building a static library, install the internal library archive # alongside the main library. In shared library builds, the internal library # is linked into the main library and does not need to be installed separately. - get_swift_install_lib_dir(STATIC_LIBRARY lib_destination_dir) + get_swift_testing_install_lib_dir(STATIC_LIBRARY lib_destination_dir) install(TARGETS _TestingInternals ARCHIVE DESTINATION ${lib_destination_dir}) endif() From 12a7ddf5ab48f66baba36eed891b9e103efcf2cc Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sun, 8 Sep 2024 08:59:15 +0000 Subject: [PATCH 2/2] Do not include on WASI Including `sys/resource.h` from wasi-libc requires a feature macro to be defined (`-D_WASI_EMULATED_PROCESS_CLOCKS`) and emits compilation errors otherwise. However, the header is not used in WASI paths, so it is safe to exclude it from the list of includes. See `sys/times.h` that is transitively included by `sys/resource.h` https://github.com/WebAssembly/wasi-libc/blob/wasi-sdk-22/libc-top-half/musl/include/sys/times.h --- Sources/_TestingInternals/include/Includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/_TestingInternals/include/Includes.h b/Sources/_TestingInternals/include/Includes.h index 68c68dcce..b7009456b 100644 --- a/Sources/_TestingInternals/include/Includes.h +++ b/Sources/_TestingInternals/include/Includes.h @@ -58,7 +58,7 @@ #include #endif -#if __has_include() +#if __has_include() && !defined(__wasi__) #include #endif