[PATCH] D62347: [Support] Modernize process launching API
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 14:34:18 PDT 2019
aganea created this revision.
aganea added reviewers: rnk, zturner, thakis.
aganea added a project: LLVM.
Herald added a reviewer: jfb.
Herald added a subscriber: kristina.
//As discussed previously, and before adding /MP <http://lists.llvm.org/pipermail/llvm-dev/2019-April/131967.html> //
The objective here is to stop doing user logic based on process return values, and instead provide a simple process lifetime API. Without this, it is a bit harder to compose programs launching, in order to handle /MP.
The other part of this patch is the explicit `llvm::sys::ReturnCode`s, which makes it easier to understand/find where LLVM programs return something.
For now I've left there the 'old' API (ie. `llvm::sys::ExecuteAndWait`, `llvm::sys::Wait`) which is now superseeded/temporarily.stubbed by the 'new' stateful API (ie. `llvm::sys::Program::executeAndWait` and `llvm::sys::Program::waitCompletion`). The plan is however to progressively remove usage of the 'old' API just after this patch is commited. Let me know if you want to see in advance how that looks.
I've tested this patch on several configurations - //let me know if I should test more//:
- Windows 10, compiled with MSVC 15.9.11, in Debug, with assertions on.
- Windows 10, compiled with Clang 8.0, Release, no assertions.
- WSL / Ubuntu 18.04, compiled with GCC 7.3, Release, no assertions.
- On a real Ubuntu 18.04 box, compiled with GCC 7.4, Release, no assertions.
Repository:
rL LLVM
https://reviews.llvm.org/D62347
Files:
include/llvm/Support/Program.h
lib/Support/Program.cpp
lib/Support/Unix/Program.inc
lib/Support/Unix/Signals.inc
lib/Support/Unix/Unix.h
lib/Support/Windows/DynamicLibrary.inc
lib/Support/Windows/Process.inc
lib/Support/Windows/Program.inc
lib/Support/Windows/WindowsSupport.h
unittests/Support/ProgramTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62347.201071.patch
Type: text/x-patch
Size: 44148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190523/dd968bc5/attachment-0001.bin>
More information about the llvm-commits
mailing list