This is an archive of the discontinued LLVM Phabricator instance.

Force test/Driver/fuchsia.c(pp) to use lld
ClosedPublic

Authored by greened on Jul 26 2018, 7:15 PM.

Details

Summary

The Fuchsia driver relies on lld so invoke clang with -fuse-ld=lld. This gets the test passing when the clang default linker is something other than lld.

Diff Detail

Repository
rL LLVM

Event Timeline

greened created this revision.Jul 26 2018, 7:15 PM
phosek requested changes to this revision.Jul 26 2018, 10:59 PM

We don't actively support gold in Fuchsia driver and currently have no plans on doing so. We should instead modify the driver to always use lld even if gold is set as the default Clang linker.

This revision now requires changes to proceed.Jul 26 2018, 10:59 PM
greened updated this revision to Diff 157689.Jul 27 2018, 7:31 AM

The Fuchsia driver relies on lld so invoke clang with -fuse-ld=lld. This gets the test passing when the clang default linker is something other than lld.

greened retitled this revision from Make test/Driver/fuchsia.c(pp) work with lld or gold to Force test/Driver/fuchsia.c(pp) to use lld.Jul 27 2018, 7:45 AM
greened edited the summary of this revision. (Show Details)
ruiu added a subscriber: ruiu.Jul 27 2018, 11:38 AM

The Fuchsia driver relies on lld so invoke clang with -fuse-ld=lld. This gets the test passing when the clang default linker is something other than lld.

Does it work if lld is not installed at all? I believe if the driver cannot find a specified linker, it reports an error instead of trying to execute a nonexistent file.

greened added a comment.EditedJul 27 2018, 1:48 PM

The Fuchsia driver relies on lld so invoke clang with -fuse-ld=lld. This gets the test passing when the clang default linker is something other than lld.

Does it work if lld is not installed at all? I believe if the driver cannot find a specified linker, it reports an error instead of trying to execute a nonexistent file.

The test will fail if lld is not available, which is no worse than the situation before this change. There does not seem to be a way to disable a test if lld is not available. I couldn't find anything appropriate for a REQUIRES in the test. I would like to leave that work for another time. This at least gets things working a little better.

phosek accepted this revision.Jul 31 2018, 12:21 AM

LGTM

This revision is now accepted and ready to land.Jul 31 2018, 12:21 AM
This revision was automatically updated to reflect the committed changes.