forked from OSchip/llvm-project
Fix pdb-linker-module test on linux.
lld-link is apparently a symlink to lld. Our pdb writing code uses llvm::sys::fs::getMainExecutable() and writes that value into the PDB, which will resolve symlinks etc. But what we really want is the exact value of argv[0], which matches what the MS linker does. Fix this by just writing argv[0] instead of calling getMainExecutable. llvm-svn: 307592
This commit is contained in:
parent
07f6efddc0
commit
77f23b9c21
|
@ -428,9 +428,7 @@ static void addLinkerModuleSymbols(StringRef Path,
|
|||
llvm::sys::fs::current_path(cwd);
|
||||
EBS.Fields.push_back(cwd);
|
||||
EBS.Fields.push_back("exe");
|
||||
std::string Exe =
|
||||
llvm::sys::fs::getMainExecutable(Config->Argv[0].data(), nullptr);
|
||||
EBS.Fields.push_back(Exe);
|
||||
EBS.Fields.push_back(Config->Argv[0]);
|
||||
EBS.Fields.push_back("pdb");
|
||||
EBS.Fields.push_back(Path);
|
||||
EBS.Fields.push_back("cmd");
|
||||
|
|
Loading…
Reference in New Issue