[llvm] [BOLT][NFC] Be more obvious about selecting X86 (PR #88527)
Michał Górny via llvm-commits
llvm-commits at lists.llvm.org
Sat May 11 02:26:12 PDT 2024
mgorny wrote:
This change is causing build failures on Gentoo Linux amd64 for me:
```
FAILED: unittests/MC/AMDGPU/AMDGPUMCTests
: && /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -m32 -mfpmath=sse -march=znver2 --param=l1-cache-size=32 --param=l1-cache-line-size=64 -O2 -pipe -frecord-gcc-switches -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/DwarfRegMappings.cpp.o unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/SIProgramInfoMCExprs.cpp.o -o unittests/MC/AMDGPU/AMDGPUMCTests -Wl,-rpath,/var/tmp/portage/sys-devel/llvm-19.0.0_pre20240509/work/llvm_build-abi_x86_32.x86/lib lib/libllvm_gtest_main.a lib/libllvm_gtest.a lib/libLLVM.so.19.0gitd86b68af -lpthread && :
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/SIProgramInfoMCExprs.cpp.o: in function `SIProgramInfoMCExprsTest_TestDeathHSAKernelEmit_Test::TestBody() [clone .localalias]':
SIProgramInfoMCExprs.cpp:(.text._ZN52SIProgramInfoMCExprsTest_TestDeathHSAKernelEmit_Test8TestBodyEv+0x77): undefined reference to `vtable for llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN52SIProgramInfoMCExprsTest_TestDeathHSAKernelEmit_Test8TestBodyEv+0x331): undefined reference to `llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernel(llvm::MachineFunction const&, llvm::SIProgramInfo const&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/SIProgramInfoMCExprs.cpp.o: in function `llvm::GCNTargetMachine::~GCNTargetMachine()':
SIProgramInfoMCExprs.cpp:(.text._ZN4llvm16GCNTargetMachineD2Ev[_ZN4llvm16GCNTargetMachineD5Ev]+0x18): undefined reference to `vtable for llvm::GCNTargetMachine'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN4llvm16GCNTargetMachineD2Ev[_ZN4llvm16GCNTargetMachineD5Ev]+0x71): undefined reference to `llvm::GCNSubtarget::~GCNSubtarget()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN4llvm16GCNTargetMachineD2Ev[_ZN4llvm16GCNTargetMachineD5Ev]+0xac): undefined reference to `llvm::AMDGPUTargetMachine::~AMDGPUTargetMachine()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/SIProgramInfoMCExprs.cpp.o: in function `llvm::GCNTargetMachine::~GCNTargetMachine()':
SIProgramInfoMCExprs.cpp:(.text._ZN4llvm16GCNTargetMachineD0Ev[_ZN4llvm16GCNTargetMachineD5Ev]+0x18): undefined reference to `vtable for llvm::GCNTargetMachine'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN4llvm16GCNTargetMachineD0Ev[_ZN4llvm16GCNTargetMachineD5Ev]+0x71): undefined reference to `llvm::GCNSubtarget::~GCNSubtarget()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN4llvm16GCNTargetMachineD0Ev[_ZN4llvm16GCNTargetMachineD5Ev]+0xac): undefined reference to `llvm::AMDGPUTargetMachine::~AMDGPUTargetMachine()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/SIProgramInfoMCExprs.cpp.o: in function `SIProgramInfoMCExprsTest::~SIProgramInfoMCExprsTest()':
SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestD2Ev[_ZN24SIProgramInfoMCExprsTestD5Ev]+0xa2): undefined reference to `llvm::GCNSubtarget::~GCNSubtarget()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestD2Ev[_ZN24SIProgramInfoMCExprsTestD5Ev]+0xe1): undefined reference to `vtable for llvm::GCNTargetMachine'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestD2Ev[_ZN24SIProgramInfoMCExprsTestD5Ev]+0x131): undefined reference to `llvm::GCNSubtarget::~GCNSubtarget()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestD2Ev[_ZN24SIProgramInfoMCExprsTestD5Ev]+0x182): undefined reference to `llvm::AMDGPUTargetMachine::~AMDGPUTargetMachine()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: unittests/MC/AMDGPU/CMakeFiles/AMDGPUMCTests.dir/SIProgramInfoMCExprs.cpp.o: in function `SIProgramInfoMCExprsTest::SIProgramInfoMCExprsTest()':
SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestC2Ev[_ZN24SIProgramInfoMCExprsTestC5Ev]+0x44e): undefined reference to `vtable for llvm::GCNTargetMachine'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestC2Ev[_ZN24SIProgramInfoMCExprsTestC5Ev]+0x4ab): undefined reference to `llvm::GCNSubtarget::~GCNSubtarget()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestC2Ev[_ZN24SIProgramInfoMCExprsTestC5Ev]+0x500): undefined reference to `llvm::AMDGPUTargetMachine::~AMDGPUTargetMachine()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestC2Ev[_ZN24SIProgramInfoMCExprsTestC5Ev]+0x778): undefined reference to `llvm::GCNSubtarget::GCNSubtarget(llvm::Triple const&, llvm::StringRef, llvm::StringRef, llvm::GCNTargetMachine const&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestC2Ev[_ZN24SIProgramInfoMCExprsTestC5Ev]+0x794): undefined reference to `llvm::GCNSubtarget::~GCNSubtarget()'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestC2Ev[_ZN24SIProgramInfoMCExprsTestC5Ev]+0x865): undefined reference to `llvm::SIProgramInfo::reset(llvm::MachineFunction const&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: SIProgramInfoMCExprs.cpp:(.text._ZN24SIProgramInfoMCExprsTestC2Ev[_ZN24SIProgramInfoMCExprsTestC5Ev]+0xdb5): undefined reference to `llvm::GCNSubtarget::~GCNSubtarget()'
collect2: error: ld returned 1 exit status
```
I think it may be relevant that we're building with `-DLLVM_ENABLE_EH=ON` and `-DLLVM_ENABLE_RTTI=ON`.
https://github.com/llvm/llvm-project/pull/88527
More information about the llvm-commits
mailing list