This is an archive of the discontinued LLVM Phabricator instance.

[Remarks][Driver] Run dsymutil when remarks are enabled
ClosedPublic

Authored by thegameg on Dec 18 2019, 1:22 PM.

Details

Summary

When clang is invoked with a source file without -c or -S, it creates a cc1 job, a linker job and if debug info is requested, a dsymutil job. In case of remarks, we should also create a dsymutil job to avoid losing the remarks that will be generated in a tempdir that gets removed.

Diff Detail

Event Timeline

thegameg created this revision.Dec 18 2019, 1:22 PM
This revision is now accepted and ready to land.Dec 18 2019, 1:24 PM
thegameg marked an inline comment as done.Dec 18 2019, 1:26 PM
thegameg added inline comments.
clang/test/Driver/darwin-opt-record.c
21

The other choice would be honoring -g0 and:

  • not passing debug-info-kind= to cc1
  • not running dsymutil
  • possibly emit a warning/error that the options are incompatible
JDevlieghere added inline comments.Dec 18 2019, 1:29 PM
clang/test/Driver/darwin-opt-record.c
21

I think the current approach is the most intuitive.

This revision was automatically updated to reflect the committed changes.