Skip to content

Commit 64c9dbb

Browse files
committed
[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.
1 parent 1bd5df7 commit 64c9dbb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lld/ELF/Driver.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,10 +1713,8 @@ static void setConfigs(opt::InputArgList &args) {
17131713
// enable the debug checks for all targets, but currently not all targets
17141714
// have support for reading Elf_Rel addends, so we only enable for a subset.
17151715
#ifndef NDEBUG
1716-
bool checkDynamicRelocsDefault = m == EM_AARCH64 || m == EM_ARM ||
1717-
m == EM_386 || m == EM_LOONGARCH ||
1718-
m == EM_MIPS || m == EM_RISCV ||
1719-
m == EM_X86_64;
1716+
bool checkDynamicRelocsDefault =
1717+
llvm::is_contained({EM_AMDGPU, EM_HEXAGON, EM_PPC, EM_PPC64}, m);
17201718
#else
17211719
bool checkDynamicRelocsDefault = false;
17221720
#endif

0 commit comments

Comments
 (0)