Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

VisualStudio projects always out of date using clang-cl toolset integration #36160

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR37187
Status CONFIRMED
Importance P normal
Reported by Benn Herrera (bherrera@reification.io)
Reported on 2018-04-20 09:01:22 -0700
Last modified on 2019-02-21 13:31:22 -0800
Version 6.0
Hardware PC Windows NT
CC hans@chromium.org, llvm-bugs@lists.llvm.org, rnk@google.com, zturner@google.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Issue observed using LLVM 6.0 x64 toolchain (<llvm_insall_dir>/msbuild-
bin/cl.exe) with Visual Studio 14 (and Visual Studio 15 using a manual toolset
integration),

MSVS default compiler options include flag for specifying location of .pdb file
for libraries. clang-cl silently ignores this switch and embeds intermediate
debug data in obj files instead of producing a single separate pdb for the
entire library. (not an issue - debugging works fine)

Projects always appear out of date due to msbuild expecting a pdb file and not
finding one.

This can be remedied by modifying the toolset-vs20XX.props file used for
MSVS/MSBuild integration:

Under the compile options add a tag to clear the pdb filename option
<ItemDefinitionGroup>
  <ClCompile>
    ...
    <!-- clang-cl embeds debug data in obj files. does not generate pdb per lib. if option not cleared projects will always appear out of date to MSVS. -->
    <ProgramDataBaseFileName/>
  </ClCompile>
</ItemDefinitionGroup>
Quuxplusone commented 6 years ago

Does the new VS integration (did we land it yet?) fix this?

Quuxplusone commented 6 years ago
(In reply to Reid Kleckner from comment #1)
> Does the new VS integration (did we land it yet?) fix this?

Latest 7.0 snapshot does not appear to have 2017 integration
Quuxplusone commented 6 years ago

This is the same problem discussed in https://bugs.llvm.org/show_bug.cgi?id=36140#c6

The workaround of setting an empty ProgramDataBaseFileName is new though.

Quuxplusone commented 5 years ago
Re-discovered and posted about here:
http://lists.llvm.org/pipermail/llvm-dev/2019-January/129589.html