This is an archive of the discontinued LLVM Phabricator instance.

[LinkerWrapper] Use `clang` to perform the device linking
ClosedPublic

Authored by jhuber6 on Jan 19 2023, 9:23 AM.

Details

Summary

Right now in the linker wrapper we manually invoke a lot of the
toolchain programs. This reproduces a lot of logic that is already
handled in clang. Since D140158 we can now target all supported
toolchains directly via cross-compilation.

This patch changes the linker wrapper to consolidate all the alternate
linking and assembler steps into a generic call to clang and let clang
handle the argument handling. This heavily simplifies the interface.

Diff Detail

Event Timeline

jhuber6 created this revision.Jan 19 2023, 9:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2023, 9:23 AM
jhuber6 requested review of this revision.Jan 19 2023, 9:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2023, 9:23 AM
JonChesterfield accepted this revision.Jan 19 2023, 9:43 AM

That's much cleaner, thanks!

This revision is now accepted and ready to land.Jan 19 2023, 9:43 AM
tra accepted this revision.Jan 19 2023, 10:21 AM

Nice.

This revision was landed with ongoing or failed builds.Jan 19 2023, 10:48 AM
This revision was automatically updated to reflect the committed changes.