[libcxx-commits] [libcxx] [libc++][test] Make filesystem tests more portable to Windows (PR #74182)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Dec 3 14:19:21 PST 2023
mstorsjo wrote:
For context here, for libcxx reviewers who might not be that familiar with these Windows concepts. These issues do come up in our own builds with Clang-cl as well, but we've worked around them differently so far.
- The issue with `windows.h` defining `min` and `max` as macros is avoided by compiling all the tests with `-DNOMINMAX`, see https://github.com/llvm/llvm-project/blob/llvmorg-18-init/libcxx/test/configs/llvm-libc%2B%2B-shared-clangcl.cfg.in#L8. This inhibits the problematic `min` and `max` defines.
- The case of `_getcwd` vs `getcwd` is handled by defining `-D_CRT_NONSTDC_NO_WARNINGS` on the same line; this disables the deprecation warnings when using the unprefixed POSIX names for these functions.
https://github.com/llvm/llvm-project/pull/74182
More information about the libcxx-commits
mailing list