[PATCH] D88308: [unittests] Preserve LD_LIBRARY_PATH in crash recovery test
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 08:47:08 PDT 2020
aganea added inline comments.
================
Comment at: llvm/unittests/Support/CrashRecoveryTest.cpp:185
bool ExecutionFailed;
int RetCode = ExecuteAndWait(Executable, argv, makeArrayRef(EnvTable), {}, 0, 0, &Error,
&ExecutionFailed);
----------------
MaskRay wrote:
> Perhaps ExecuteAndWait should have a mode to append environment variables. In the absence of that feature,
>
> llvm/utils/not/not.cpp
>
> ```
> #ifdef _WIN32
> SetEnvironmentVariableA("...);
> #else
> setenv(...);
> #endif
> ```
Agreed. In that case @miyuki would this work?
Replacing:
```
std::vector<StringRef> EnvTable;
EnvTable.push_back("LLVM_CRC_UNIXCRCRETURNCODE=1");
```
by:
```
setenv("LLVM_CRC_UNIXCRCRETURNCODE", "1", 0);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88308/new/
https://reviews.llvm.org/D88308
More information about the llvm-commits
mailing list