This is an archive of the discontinued LLVM Phabricator instance.

[debuginfo-tests][dexter] Add --builder gcc support for POSIX
ClosedPublic

Authored by Pierre-vh on Feb 28 2020, 4:06 AM.

Details

Summary

During our tests, we found that Dexter lacked GCC support, so we added --builder GCC support and we now propose to upstream it.
We think that having GCC support in Dexter is a great idea as it allows us to make comparisons between Clang and GCC.

This is a rather trivial change:

  • Added a gcc.sh script (for POSIX systems) that invokes GCC instead of clang. The script is very similar to the clang.sh script in the same folder.
  • Added an implementation of _verify_options in the clang_opt_bisect tool so it'll refuse to run when the builder is GCC

Diff Detail

Event Timeline

Pierre-vh created this revision.Feb 28 2020, 4:06 AM
Pierre-vh created this object with visibility "No One".
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2020, 4:06 AM
Pierre-vh changed the visibility from "No One" to "Public (No Login Required)".

Would it not be possible to override handle_options in the tool class, put the logic from _verify_options there (raising an Error if there's a problem), and then call super(Tool,self).handle_options() if there's no error? This would avoid the need to add a new method / code path.

Otherwise, adding a gcc builder sounds great!

Would it not be possible to override handle_options in the tool class, put the logic from _verify_options there (raising an Error if there's a problem), and then call super(Tool,self).handle_options() if there's no error? This would avoid the need to add a new method / code path.

Otherwise, adding a gcc builder sounds great!

This is definitely possible, but I did it that way because my other change (the gen tool RFC) also needs a similar feature (see the parent diff: D75337)
If you prefer, I can change both this diff and D75343 to do what you suggested, then I can simply delete the parent revision (D75337).

Pierre-vh updated this revision to Diff 247816.Mar 3 2020, 1:09 AM

Here is the updated revision with _verify_options removed.
Note that it also contains 2 minor formatting fixes, but if you want I can remove them.

jmorse accepted this revision.Mar 3 2020, 6:03 AM

LGTM

This revision is now accepted and ready to land.Mar 3 2020, 6:03 AM
This revision was automatically updated to reflect the committed changes.