llvm-project/libcxx/test
Martin Storsjö c5a74c0890 [libcxx] [test] Simplify get_temp_file_name() for mingw
Use the same codepaths as for MSVC. Mingw-w64 does have the _mktemp_s
function; on Vista and newer, msvcrt.dll does contain the function,
which ends up called. (Same thing in the UCRT.) In older versions of
msvcrt.dll (older than what libc++ supports), mingw-w64 provides a
fallback implementation.

This effectively reverts 23323e25f8 (and
d07e5c23b4). That commit tried to fix
unspecified MinGW build breakage.

This reduces the risk of temp name collisions between processes (when
running multiple tests in parallel); the path returned by
GetTempFileName can easily collide with other similar paths.
(_mktemp_s on the other hand tries to avoid such clashes by using
the process id as part of the uniqueness seed.)

This avoids stray random failures in fstreams tests in mingw configurations.

Differential Revision: https://reviews.llvm.org/D98526
2021-09-08 10:24:34 +03:00
..
configs [libc++] Support -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on in CI 2021-08-30 12:59:08 -07:00
libcxx [libc++] Fix std::to_address(array). 2021-09-07 13:56:25 -04:00
std [libc++] Fix std::to_address(array). 2021-09-07 13:56:25 -04:00
support [libcxx] [test] Simplify get_temp_file_name() for mingw 2021-09-08 10:24:34 +03:00
CMakeLists.txt [runtimes] Simplify how we set the target triple 2021-07-16 10:33:39 -04:00
lit.cfg.py [libc++] Allow specifying custom Lit config files 2020-06-18 10:06:04 -04:00