Skip to content

Commit f04cc0f

Browse files
authored
Add shift temporary files directory patch llvm 20 build
1 parent eac22b5 commit f04cc0f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp
2+
index aa10b160ccf8..184867e2b55f 100644
3+
--- a/clang/lib/Interpreter/Wasm.cpp
4+
+++ b/clang/lib/Interpreter/Wasm.cpp
5+
@@ -76,8 +76,8 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) {
6+
llvm::TargetMachine *TargetMachine = Target->createTargetMachine(
7+
PTU.TheModule->getTargetTriple(), "", "", TO, llvm::Reloc::Model::PIC_);
8+
PTU.TheModule->setDataLayout(TargetMachine->createDataLayout());
9+
- std::string ObjectFileName = PTU.TheModule->getName().str() + ".o";
10+
- std::string BinaryFileName = PTU.TheModule->getName().str() + ".wasm";
11+
+ std::string ObjectFileName = "/tmp/" + PTU.TheModule->getName().str() + ".o";
12+
+ std::string BinaryFileName = "/tmp/" + PTU.TheModule->getName().str() + ".wasm";
13+
14+
std::error_code Error;
15+
llvm::raw_fd_ostream ObjectFileOutput(llvm::StringRef(ObjectFileName), Error);

0 commit comments

Comments
 (0)