Page MenuHomePhabricator

Force Hexagon to use default (hexagon-link) linker
Needs ReviewPublic

Authored by phosek on Oct 13 2018, 6:16 PM.

Details

Reviewers
sidneym
rsmith
Summary

Hexagon relies on hexagon-link so invoke Clang to -fuse-ld=ld to
always use the default linker, otherwise tests break when the Clang
default linker is set to anything other than default.

Diff Detail

Repository
rC Clang

Event Timeline

phosek created this revision.Oct 13 2018, 6:16 PM

This was introduced in D53038 which broke all our bots that use CLANG_DEFAULT_LINKER="lld". The same solution was applied to other targets (e.g. D49899) and while isn't great it should at least unbreak vendors that use non-default linkers.

As said on D53250 I think this is the right way to fix these tests: We already do the same for -stdlib=platform and -rtlib=platform.

https://reviews.llvm.org/D53219 added a check for either hexagon-ld or ld. I merged that change earlier today. I can change the test to pass -fuse-ld, let me know. Thanks,

https://reviews.llvm.org/D53219 added a check for either hexagon-ld or ld. I merged that change earlier today. I can change the test to pass -fuse-ld, let me know. Thanks,

Passing -fuse-ld=ld is less error prone than checking for hexagon-link or *ld* in case someone sets the default linker to something else, e.g. link.exe on Windows or something like foo-link on some new platform.