Page MenuHomePhabricator

[lld-macho] Make time-trace* options more permissive.
ClosedPublic

Authored by oontvoo on Apr 6 2021, 8:46 PM.

Details

Reviewers
int3
Group Reviewers
Restricted Project
Commits
rGdb851dfb4958: [lld-macho] Make time-trace* options more permissive.
Summary

If either time-trace-granularity or time-trace-file is specified, then don't make users specify -time-trace.
It seems silly that I have to type all three options, eg, -time-trace -time-trace-file=- -time-trace-granularity=....

Diff Detail

Event Timeline

oontvoo created this revision.Apr 6 2021, 8:46 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
oontvoo requested review of this revision.Apr 6 2021, 8:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2021, 8:46 PM
int3 accepted this revision.Apr 7 2021, 8:28 AM
int3 added inline comments.
lld/test/MachO/time-trace.s
17

technically we should test if *either* of the other two are used :)

This revision is now accepted and ready to land.Apr 7 2021, 8:28 AM
oontvoo marked an inline comment as done.Apr 7 2021, 12:38 PM
oontvoo added inline comments.
lld/test/MachO/time-trace.s
17

Done - I've removed the --time-trace from line 11 - that should test it :)

oontvoo updated this revision to Diff 335908.Apr 7 2021, 12:38 PM
oontvoo marked an inline comment as done.

updated diff

This revision was landed with ongoing or failed builds.Apr 7 2021, 1:00 PM
This revision was automatically updated to reflect the committed changes.
int3 added inline comments.Apr 7 2021, 2:34 PM
lld/MachO/Driver.cpp
1036–1038

looks like hasArg actually takes a varargs list, so I think this should work

oontvoo added inline comments.Apr 8 2021, 11:37 AM
lld/MachO/Driver.cpp
1036–1038

Thanks!