-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
patches/llvm/emscripten-clang19-2-shift-temporary-files-to-tmp-dir.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp | ||
index aa10b160ccf8..184867e2b55f 100644 | ||
--- a/clang/lib/Interpreter/Wasm.cpp | ||
+++ b/clang/lib/Interpreter/Wasm.cpp | ||
@@ -76,8 +76,8 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { | ||
llvm::TargetMachine *TargetMachine = Target->createTargetMachine( | ||
PTU.TheModule->getTargetTriple(), "", "", TO, llvm::Reloc::Model::PIC_); | ||
PTU.TheModule->setDataLayout(TargetMachine->createDataLayout()); | ||
- std::string ObjectFileName = PTU.TheModule->getName().str() + ".o"; | ||
- std::string BinaryFileName = PTU.TheModule->getName().str() + ".wasm"; | ||
+ std::string ObjectFileName = "/tmp/" + PTU.TheModule->getName().str() + ".o"; | ||
+ std::string BinaryFileName = "/tmp/" + PTU.TheModule->getName().str() + ".wasm"; | ||
|
||
std::error_code Error; | ||
llvm::raw_fd_ostream ObjectFileOutput(llvm::StringRef(ObjectFileName), Error); |