diff options
| author | Florian Schmiderer <florian.schmiderer@posteo.net> | 2023-09-09 14:00:24 +0200 | 
|---|---|---|
| committer | Florian Schmiderer <florian.schmiderer@posteo.net> | 2023-09-25 19:31:58 +0200 | 
| commit | 91544e6a937b4c2c7181578533e6d10991559c14 (patch) | |
| tree | 5260062ab53ed1efffb9311a76dccd5b8be30bd9 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 9d32ba3a7219e28b0d44b5eb4d564ca58114356f (diff) | |
| download | rust-91544e6a937b4c2c7181578533e6d10991559c14.tar.gz rust-91544e6a937b4c2c7181578533e6d10991559c14.zip  | |
Pass name of object file to LLVM so it can correctly emit S_OBJNAME
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 461b5290e69..b729c40228b 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -416,6 +416,7 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine( bool RelaxELFRelocations, bool UseInitArray, const char *SplitDwarfFile, + const char *OutputObjFile, const char *DebugInfoCompression, bool ForceEmulatedTls, const char *ArgsCstrBuff, size_t ArgsCstrBuffLen) { @@ -448,6 +449,9 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine( if (SplitDwarfFile) { Options.MCOptions.SplitDwarfFile = SplitDwarfFile; } + if (OutputObjFile) { + Options.ObjectFilenameForDebug = OutputObjFile; + } #if LLVM_VERSION_GE(16, 0) if (!strcmp("zlib", DebugInfoCompression) && llvm::compression::zlib::isAvailable()) { Options.CompressDebugSections = DebugCompressionType::Zlib;  | 
