Skip to content

Commit 5e30c74

Browse files
authored
[mlir] Use the process (host) triple in MLIRTargetLLVMTests (#69538)
The test is meant to execute on the native target and only initializes the native target. However, it then gets the default target triple instead of the process (host) triple. This fails in cases where the native target and the default target are not the same. The test was added here: https://reviews.llvm.org/D154100
1 parent 04d6308 commit 5e30c74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/unittests/Target/LLVM/SerializeToLLVMBitcode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ TEST_F(MLIRTargetLLVM, SKIP_WITHOUT_NATIVE(SerializeToLLVMBitcode)) {
5555
ASSERT_TRUE(!!module);
5656

5757
// Serialize the module.
58-
std::string targetTriple = llvm::sys::getDefaultTargetTriple();
58+
std::string targetTriple = llvm::sys::getProcessTriple();
5959
LLVM::ModuleToObject serializer(*(module->getOperation()), targetTriple, "",
6060
"");
6161
std::optional<SmallVector<char, 0>> serializedModule = serializer.run();

0 commit comments

Comments
 (0)