[PATCH] D108120: [lld] Add CMake options to disable individual linkers
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 09:00:36 PDT 2021
arichardson added inline comments.
================
Comment at: lld/tools/lld/lld.cpp:155
+ if (isPETarget(args)) {
+#if !LLD_ENABLE_COFF_LINKER
+ missingLinkerSupport("COFF");
----------------
MaskRay wrote:
> then and else should be swapped.
Like this?
```
#if LLD_ENABLE_COFF_LINKER
return !mingw::link(args, exitEarly, stdoutOS, stderrOS);
#else
missingLinkerSupport("COFF");
#endif
```
I originally used ! to catch cases where the macro is not defined (since we don't build with -Wundef), but I could use != 0 to get the same error with the branches inverted.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108120/new/
https://reviews.llvm.org/D108120
More information about the llvm-commits
mailing list