From 26fd91422dec3e30e6983b715557dfa85a8f9910 Mon Sep 17 00:00:00 2001 From: ASDAlexander77 Date: Sun, 5 Jul 2026 12:42:52 +0100 Subject: [PATCH] Add --no-default-lib to tester opts and fix gctors-as-method flag accumulation test-runner was overwriting tslang_opt_ext with a raw string literal, so setting --gctors-as-method clobbered any prior flags instead of appending. Switch it to std::string and append with +=. --- tslang/test/tester/test-runner.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tslang/test/tester/test-runner.cpp b/tslang/test/tester/test-runner.cpp index 13e8cef46..6560daa8e 100644 --- a/tslang/test/tester/test-runner.cpp +++ b/tslang/test/tester/test-runner.cpp @@ -89,17 +89,17 @@ auto sharedLibCompileTime = false; auto gctorsAsMethod = false; #ifndef COMPILE_DEBUG auto opt = true; -auto tslang_opt = "--opt --opt_level=3"; +auto tslang_opt = "--opt --opt_level=3 --no-default-lib"; #define JIT_NAME "jit" #define COMPILE_NAME "compile" #else auto opt = false; -auto tslang_opt = "--di --opt_level=0"; +auto tslang_opt = "--di --opt_level=0 --no-default-lib"; #define JIT_NAME "jitd" #define COMPILE_NAME "compiled" #endif -auto tslang_opt_ext = ""; +auto tslang_opt_ext = std::string(""); void createJitBatchFile() { @@ -334,7 +334,7 @@ void createMultiCompileBatchFile(std::string tempOutputFileNameNoExt, std::vecto { if (gctorsAsMethod) { - tslang_opt_ext = "--gctors-as-method"; + tslang_opt_ext += " --gctors-as-method"; } #ifdef WIN32 @@ -409,7 +409,7 @@ void createSharedMultiBatchFile(std::string tempOutputFileNameNoExt, std::vector { if (gctorsAsMethod) { - tslang_opt_ext = "--gctors-as-method"; + tslang_opt_ext += "--gctors-as-method"; } auto linker_opt = SHARED_LIB_OPT;