This is an archive of the discontinued LLVM Phabricator instance.

Refactor DragonFly BSD toolchain driver.
Needs ReviewPublic

Authored by rimvydas on Jul 8 2017, 5:55 AM.

Details

Reviewers
cfe-commits
Summary

Make it more similar to FreeBSD one to reduce differences.
In preparations for later submissions.

While there, add more handling of flags (including OpenMP https://reviews.llvm.org/D35129).

Diff Detail

Event Timeline

rimvydas created this revision.Jul 8 2017, 5:55 AM
mgorny added a subscriber: mgorny.Mar 4 2019, 6:49 AM
mgorny added inline comments.
lib/Driver/ToolChains/DragonFly.cpp
118

Can't crt1 be non-null only if !Args.hasArg(options::OPT_shared here? i.e. is there a reason to do it like this instead of just pushing it inside the above if?

123

This default will never be used.

185

Inconsistency here: above you used helper variable, here you duplicate the whole line.

rimvydas added inline comments.Mar 5 2019, 8:46 AM
lib/Driver/ToolChains/DragonFly.cpp
118

The crt1 can only be used if !Args.hasArg(options::OPT_shared, both declaration and CmdArgs.push_back could be moved inside. The only reason for this adjustment is to reduce stylistic differences against lib/Driver/ToolChains/FreeBSD.cpp driver layout.

123

Correct. Could be changed in both FreeBSD.cpp and DragonFly.cpp.

185

Same as two previous. Only to match lib/Driver/ToolChains/FreeBSD.cpp layout.