diff --git a/tslang/test/tester/CMakeLists.txt b/tslang/test/tester/CMakeLists.txt index d21958d9a..10d66dbe4 100644 --- a/tslang/test/tester/CMakeLists.txt +++ b/tslang/test/tester/CMakeLists.txt @@ -2230,23 +2230,22 @@ if (WIN32) endif() # An async program linked by tslang itself (test-runner links with gc.lib whatever the model) under -# every model but gc - see async-without-collector.cmake. -if (WIN32) - if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") - set(async_without_collector_opt "--opt;--opt_level=3") - else() - set(async_without_collector_opt "--di;--opt_level=0") - endif() - add_test(NAME test-compile-async-without-collector - COMMAND ${CMAKE_COMMAND} - "-DTSLANG=$" - "-DTESTS_DIR=${PROJECT_SOURCE_DIR}/test/tester/tests" - "-DWORK_DIR=${CMAKE_CURRENT_BINARY_DIR}/async-without-collector" - "-DLLVM_LIB=${LLVM_LIBRARY_DIR}" - "-DTSLANG_LIB=${CMAKE_BINARY_DIR}/lib" - "-DOPT=${async_without_collector_opt}" - -P "${CMAKE_CURRENT_SOURCE_DIR}/async-without-collector.cmake") +# every model but gc - see async-without-collector.cmake. Every platform: the static async runtime +# is an archive on Linux too, and before the split it failed there the same way. +if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") + set(async_without_collector_opt "--opt;--opt_level=3") +else() + set(async_without_collector_opt "--di;--opt_level=0") endif() +add_test(NAME test-compile-async-without-collector + COMMAND ${CMAKE_COMMAND} + "-DTSLANG=$" + "-DTESTS_DIR=${PROJECT_SOURCE_DIR}/test/tester/tests" + "-DWORK_DIR=${CMAKE_CURRENT_BINARY_DIR}/async-without-collector" + "-DLLVM_LIB=${LLVM_LIBRARY_DIR}" + "-DTSLANG_LIB=${CMAKE_BINARY_DIR}/lib" + "-DOPT=${async_without_collector_opt}" + -P "${CMAKE_CURRENT_SOURCE_DIR}/async-without-collector.cmake") # tslang choosing the collector's linkage itself under -mm=gc - see shared-collector-auto.cmake. if (WIN32) diff --git a/tslang/test/tester/async-without-collector.cmake b/tslang/test/tester/async-without-collector.cmake index 14dd1c23b..dd8bfe320 100644 --- a/tslang/test/tester/async-without-collector.cmake +++ b/tslang/test/tester/async-without-collector.cmake @@ -4,11 +4,13 @@ # code used to sit in the scheduler's own object file, so every program that awaits anything pulled # in references to GC_allow_register_threads, GC_register_my_thread, GC_unregister_my_thread and # GC_get_stack_base - and under rc, none and own the compiler links no gc.lib, so none of them -# linked: "unresolved external symbol GC_allow_register_threads". It is an object file of its own +# linked: "unresolved external symbol GC_allow_register_threads" on Windows, "undefined reference to +# `GC_register_my_thread'" on Linux. It is an object file of its own # now, pulled in only by the call to GC_enable_threads that the GC pass puts in a gc program. # -# This drives `tslang --emit=exe` itself, which `test-runner` does not: it links with lld directly, -# and always with gc.lib, so the rc and none corpus runs of the same file never saw it. +# This drives `tslang --emit=exe` itself, which `test-runner` does not: it links the program itself, +# and always with the collector (gc.lib, -lgc), so the rc and none corpus runs of the same file never +# saw it. cmake_minimum_required(VERSION 3.17.3)