This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Don't default to DWARF 2 on Solaris
ClosedPublic

Authored by ro on Sep 1 2023, 5:20 AM.

Details

Summary

clang currently defaults to DWARF 2 on Solaris. This dates back to LLVM 3.8.0. I suspect this is related to gcc/config/sol2.cc (solaris_override_options) doing the same unless HAVE_LD_EH_FRAME_CIEV3. The latter is 1 on both Solaris 11.3 and 11.4, so the workaround has become irrelevant these days.

This patch removes the Solaris override, adjusting affected testcases accordingly.

Tested on amd64-pc-solaris2.11 (Release and Debug builds) and sparcv9-sun-solaris2.11 (Release build).

Diff Detail

Event Timeline

ro created this revision.Sep 1 2023, 5:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2023, 5:20 AM
ro requested review of this revision.Sep 1 2023, 5:20 AM
MaskRay accepted this revision.Sep 1 2023, 9:15 AM

Looks great!

clang/test/CodeGen/dwarf-version.c
7

Switch to --target= while moving lines.

This revision is now accepted and ready to land.Sep 1 2023, 9:15 AM
ro marked an inline comment as done.Sep 1 2023, 11:02 AM
ro added inline comments.
clang/test/CodeGen/dwarf-version.c
7

Two questions:

  • Wouldn't it be better to keep the style consistent across a file, rather than introduce a mix?
  • I guess it's ok to just commit the patch with such a slight revision without re-uploading it to Phabricator.
This revision was landed with ongoing or failed builds.Sep 1 2023, 11:03 AM
This revision was automatically updated to reflect the committed changes.
ro marked an inline comment as done.