[PATCH] D87418: [LLD] Allow configuring default ld.lld backend
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 13:35:09 PDT 2020
pcc added a comment.
How widespread are these build systems that parse help output? (Given that it took until now to discover them, I'd venture "not very".) Maybe it would be better to fix them to explicitly pass `-m` and/or do something that doesn't rely on parsing help output (e.g. just try the flag and see whether it fails).
================
Comment at: lld/CMakeLists.txt:196
+set(LLD_DEFAULT_LD_LLD_BACKEND "ELF"
+ CACHE STRING "Default backend for ld.lld, can be either ELF (default) or MINGW")
----------------
MaskRay wrote:
> How about a boolean variable `LLD_DEFAULT_LD_LLD_IS_MINGW`?
>
> Then you can write `#if LLD_DEFAULT_LD_LLD_IS_MINGW`, a Bazel based build system which does not need to this variable (my users) does not need any change.
> Additionally, the gn build will not break.
The other build systems aren't really supported though, so we should probably do whatever makes sense for the cmake build and let the other build systems deal with it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87418/new/
https://reviews.llvm.org/D87418
More information about the llvm-commits
mailing list