[libc++] Fix extern template test failing on Windows

See https://reviews.llvm.org/D94718#2521489 for details.

GitOrigin-RevId: 90407b16b1d3e38f1360b6a24ceab801ab9cefc1
diff --git a/test/libcxx/debug/extern-templates.sh.cpp b/test/libcxx/debug/extern-templates.sh.cpp
index d5039d4..b2ed6a6 100644
--- a/test/libcxx/debug/extern-templates.sh.cpp
+++ b/test/libcxx/debug/extern-templates.sh.cpp
@@ -15,7 +15,7 @@
 // UNSUPPORTED: libcpp-has-no-localization
 
 // RUN: %{cxx} %{flags} %{compile_flags} %s %{link_flags} -fPIC -DTU1 -D_LIBCPP_DEBUG=1 -fvisibility=hidden -shared -o %t.lib
-// RUN: %{cxx} %{flags} %{compile_flags} %s %t.lib %{link_flags} -fPIC -DTU2 -D_LIBCPP_DEBUG=1 -fvisibility=hidden -o %t.exe
+// RUN: cd %T && %{cxx} %{flags} %{compile_flags} %s %basename_t.tmp.lib %{link_flags} -fPIC -DTU2 -D_LIBCPP_DEBUG=1 -fvisibility=hidden -o %t.exe
 // RUN: %{exec} %t.exe
 
 #include <cassert>