forked from OSchip/llvm-project
[Support][test] Unconditionally use setenv macro when compiling on Windows
This test currently fails to compile when using a MinGW toolchain as setenv is not defined. This function is a POSIX function Windows does not implement. This patch enables the setenv macro used in the unit test for all of Windows, making the test compile and run successfully. Differential Revision: https://reviews.llvm.org/D98271
This commit is contained in:
parent
c11ff4bbad
commit
1956288fbb
|
@ -240,7 +240,7 @@ extern const char *TestMainArgv0;
|
|||
// Just a reachable symbol to ease resolving of the executable's path.
|
||||
static cl::opt<std::string> ThreadPoolTestStringArg1("thread-pool-string-arg1");
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
#define setenv(name, var, ignore) _putenv_s(name, var)
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue