forked from OSchip/llvm-project
[test] Speculative fix for bots
Bot has error "Failed to create target from default triple: Unable to find target for this triple (no targets are registered)", likely because we only initialized the native target, not the registered target if it's different. https://lab.llvm.org/buildbot/#/builders/86/builds/13664
This commit is contained in:
parent
85f8698eb9
commit
5c291482ec
|
@ -15,12 +15,13 @@ using namespace llvm;
|
|||
|
||||
class PassBuilderCTest : public testing::Test {
|
||||
void SetUp() override {
|
||||
LLVMInitializeNativeTarget();
|
||||
LLVMInitializeAllTargetInfos();
|
||||
char *Triple = LLVMGetDefaultTargetTriple();
|
||||
char *Err;
|
||||
LLVMTargetRef Target;
|
||||
if (LLVMGetTargetFromTriple(Triple, &Target, &Err)) {
|
||||
FAIL() << "Failed to create target from default triple: " << Err;
|
||||
FAIL() << "Failed to create target from default triple (" << Triple
|
||||
<< "): " << Err;
|
||||
}
|
||||
TM = LLVMCreateTargetMachine(Target, Triple, "generic", "",
|
||||
LLVMCodeGenLevelDefault, LLVMRelocDefault,
|
||||
|
|
Loading…
Reference in New Issue