[libomptarget][amdgpu][nfc] Fix build on centos
rtl.cpp replaced 224 with a #define from elf.h, but that
doesn't work on a centos 7 build machine with an old elf.h
Differential D94528
[libomptarget][amdgpu][nfc] Fix build on centos JonChesterfield on Jan 12 2021, 10:00 AM. Authored by
Details [libomptarget][amdgpu][nfc] Fix build on centos rtl.cpp replaced 224 with a #define from elf.h, but that
Diff Detail
Event TimelineComment Actions Adding Tony and Ron as reviewers, since I think one of you replaced the 224 literal. We could expose amdgcnMachineID=224 in a header which is included by a file that includes llvm's elf.h, and static_assert that 224 is indeed the right value, but I don't think the line noise is worth it.
Comment Actions This file uses the system elf.h because it uses libelf. Sadly llvm's elf.h and the gnu elf.h conflict if both are included. I'm vaguely inclined to drop the dependency on libelf, but as libomptarget uses it anyway it wouldn't make much difference. |
What ELF header file is being used? Should it be using the LLVM provide one which does have the definition? Or is this file part of a component that does not want a dependency on LLVM headers even though it is present in the LLVM code base?