[lld] r307592 - Fix pdb-linker-module test on linux.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 14:09:11 PDT 2017
Author: zturner
Date: Mon Jul 10 14:09:11 2017
New Revision: 307592
URL: http://llvm.org/viewvc/llvm-project?rev=307592&view=rev
Log:
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.
Modified:
lld/trunk/COFF/PDB.cpp
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=307592&r1=307591&r2=307592&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Mon Jul 10 14:09:11 2017
@@ -428,9 +428,7 @@ static void addLinkerModuleSymbols(Strin
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");
More information about the llvm-commits
mailing list