Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whether to support finding pdb files from outputpath #94152

Closed
GkvJwa opened this issue Jun 2, 2024 · 2 comments · Fixed by #94153
Closed

Whether to support finding pdb files from outputpath #94152

GkvJwa opened this issue Jun 2, 2024 · 2 comments · Fixed by #94153
Labels

Comments

@GkvJwa
Copy link
Contributor

GkvJwa commented Jun 2, 2024

When I converted an existing project on Windows to use clang for compilation, when linking, lld-link.exe had a lot more warning messages like the following than link.exe(msvc)

lld-link : warning : Cannot use debug info for 'aa.lib(aa.obj)' [LNK4099]
>>> failed to load reference 'aa.pdb': no such file or directory

lld-link : warning : Cannot use debug info for 'bb.lib(bb.obj)' [LNK4099]
>>> failed to load reference 'bb.pdb': no such file or directory

After checked, I found that the existing project structure uses the following method to link

out                                -- directory
  bin                              -- directory
    a.exe
    aa.pdb
    bb.pdb
  lib                              -- directory
    bb.lib

out1                               -- directory
  lib                              -- directory
    aa.lib

Executable file(a.exe) needs to link two static libraries(aa.lib/bb.lib)
These pdb files are in the same folder as the final generated a.exe

When using link.exe, it will also check whether the pdb file of the static library exists in the directory where the exe/dll is finally generated, but lld-link.exe will not, causing the above warning to appear.

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 2, 2024

@llvm/issue-subscribers-debuginfo

Author: None (GkvJwa)

When I converted an existing project on Windows to use clang for compilation, when linking, lld-link.exe had a lot more warning messages like the following than link.exe(msvc) ``` lld-link : warning : Cannot use debug info for 'aa.lib(aa.obj)' [LNK4099] >>> failed to load reference 'aa.pdb': no such file or directory

lld-link : warning : Cannot use debug info for 'bb.lib(bb.obj)' [LNK4099]
>>> failed to load reference 'bb.pdb': no such file or directory


After checked, I found that the existing project structure uses the following method to link

out -- directory
bin -- directory
a.exe
aa.pdb
bb.pdb
lib -- directory
bb.lib

out1 -- directory
lib -- directory
aa.lib

Executable file(a.exe) needs to link two static libraries(aa.lib/bb.lib)
These pdb files are in the same folder as the final generated a.exe

When using link.exe, it will also check whether the pdb file of the static library exists in the directory where the exe/dll is finally generated, but lld-link.exe will not, causing the above warning to appear.
</details>

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 17, 2024

@llvm/issue-subscribers-lld-coff

Author: None (GkvJwa)

When I converted an existing project on Windows to use clang for compilation, when linking, lld-link.exe had a lot more warning messages like the following than link.exe(msvc) ``` lld-link : warning : Cannot use debug info for 'aa.lib(aa.obj)' [LNK4099] >>> failed to load reference 'aa.pdb': no such file or directory

lld-link : warning : Cannot use debug info for 'bb.lib(bb.obj)' [LNK4099]
>>> failed to load reference 'bb.pdb': no such file or directory


After checked, I found that the existing project structure uses the following method to link

out -- directory
bin -- directory
a.exe
aa.pdb
bb.pdb
lib -- directory
bb.lib

out1 -- directory
lib -- directory
aa.lib

Executable file(a.exe) needs to link two static libraries(aa.lib/bb.lib)
These pdb files are in the same folder as the final generated a.exe

When using link.exe, it will also check whether the pdb file of the static library exists in the directory where the exe/dll is finally generated, but lld-link.exe will not, causing the above warning to appear.
</details>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants