-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch on llvm 19.1.6 to take care of temporary files generated at…
… runtime (#1476) * Add patch on llvm 19.1.6 to take care of temporary files generated at runtime * changes as per Martin's Suggestion
- Loading branch information
1 parent
49bda97
commit 4374987
Showing
3 changed files
with
21 additions
and
6 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
15 changes: 15 additions & 0 deletions
15
recipes/recipes_emscripten/llvm/patches/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); |
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