[lld] 64c9dbb - [ELF] checkDynamicRelocsDefault: invert the condition
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 15 21:06:24 PDT 2023
Author: Fangrui Song
Date: 2023-09-15T21:06:19-07:00
New Revision: 64c9dbbf4e82224a64dc878e2dc8f7d7541746eb
URL: https://github.com/llvm/llvm-project/commit/64c9dbbf4e82224a64dc878e2dc8f7d7541746eb
DIFF: https://github.com/llvm/llvm-project/commit/64c9dbbf4e82224a64dc878e2dc8f7d7541746eb.diff
LOG: [ELF] checkDynamicRelocsDefault: invert the condition
Most targets support --check-dynamic-relocations --apply-dynamic-relocs, so it
makes sense to invert the condition. We want new ports to support
getImplicitAddend.
Added:
Modified:
lld/ELF/Driver.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 9d167293574fa64..ebed8221a039b1f 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1713,10 +1713,8 @@ static void setConfigs(opt::InputArgList &args) {
// enable the debug checks for all targets, but currently not all targets
// have support for reading Elf_Rel addends, so we only enable for a subset.
#ifndef NDEBUG
- bool checkDynamicRelocsDefault = m == EM_AARCH64 || m == EM_ARM ||
- m == EM_386 || m == EM_LOONGARCH ||
- m == EM_MIPS || m == EM_RISCV ||
- m == EM_X86_64;
+ bool checkDynamicRelocsDefault =
+ llvm::is_contained({EM_AMDGPU, EM_HEXAGON, EM_PPC, EM_PPC64}, m);
#else
bool checkDynamicRelocsDefault = false;
#endif
More information about the llvm-commits
mailing list