Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ if(BUILD_TESTING)
add_executable(tiny_ga_tls test/fixtures/tiny_ga_tls.cpp)
target_compile_definitions(tiny_ga_tls PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
target_compile_options(tiny_ga_tls PRIVATE /W4 /permissive- /utf-8 /GS- /GA)
# /GA can remove the _tls_index reference that pulls in the CRT TLS directory.
target_link_options(tiny_ga_tls PRIVATE /INCLUDE:_tls_used)
set_target_properties(tiny_ga_tls PROPERTIES
OUTPUT_NAME tiny_ga_tls
RUNTIME_OUTPUT_DIRECTORY "${TINY_FIXTURE_DIR}"
Expand Down
3 changes: 2 additions & 1 deletion runtime/test/loader_tls_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@ void test_ga_tls_existing_thread(const fs::path& exe) {
{
rt::Loader loader(exe.parent_path());
rt::Module& m = loader.load(exe);
check(m.tls_index != 0, "the /GA fixture gets a module TLS index other than the process EXE's 0");
check(m.tls_index != rt::kNoTlsIndex && m.tls_index != 0,
"the /GA fixture gets a valid module TLS index other than the process EXE's 0");
check(m.tls_ga_slot != rt::kNoTlsIndex, "load() rewrites the /GA fixture's index-0 TLS reads");
get = find_export<int(__cdecl*)()>(m, "ga_tls_get");
set = find_export<void(__cdecl*)(int)>(m, "ga_tls_set");
Expand Down
Loading