diff options
author | Alexandre Ganea <alexandre.ganea@legionlabs.com> | 2022-02-08 17:36:14 -0500 |
---|---|---|
committer | Alexandre Ganea <alexandre.ganea@legionlabs.com> | 2022-02-08 19:12:15 -0500 |
commit | 1e661e583d8406d5fce5269e803b287987332831 (patch) | |
tree | fa78ce596c51255317b9cc4b1f878a43d1cbda2a /lld/include | |
parent | 9b81d2fae8c05ea611578137101e46a7b61fbaed (diff) | |
download | llvm-1e661e583d8406d5fce5269e803b287987332831.tar.gz |
[MLIR] Temporary workaround for calling the LLD ELF driver as-a-lib
This fixes the situation described in https://github.com/llvm/llvm-project/issues/53475 with a repro exposed by https://github.com/ROCmSoftwarePlatform/D108850-lld-bug-reproduction
This is purposely just a workaround to unblock users. This could be transplanted to the release/14.x branch if need be. A proper fix will later be provided in https://reviews.llvm.org/D119049.
Differential Revision: https://reviews.llvm.org/D119277
Diffstat (limited to 'lld/include')
-rw-r--r-- | lld/include/lld/Common/Driver.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lld/include/lld/Common/Driver.h b/lld/include/lld/Common/Driver.h index 91cb91b9f808..4420918e22ad 100644 --- a/lld/include/lld/Common/Driver.h +++ b/lld/include/lld/Common/Driver.h @@ -52,6 +52,11 @@ namespace wasm { bool link(llvm::ArrayRef<const char *> args, llvm::raw_ostream &stdoutOS, llvm::raw_ostream &stderrOS, bool exitEarly, bool disableOutput); } -} + +// Temporary API that forces global state cleanup between explicit calls to +// drivers above. DO NOT USE - this will be replaced by safeLldMain(). See +// discussion in https://reviews.llvm.org/D119049. +void cleanup(); +} // namespace lld #endif |