This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Pass -X to ld for riscv64-openbsd
ClosedPublic

Authored by brad on Jun 17 2022, 4:55 PM.

Details

Summary

Noticing https://reviews.llvm.org/D127826, add support for OpenBSD which uses lld on riscv64.

Diff Detail

Event Timeline

brad created this revision.Jun 17 2022, 4:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2022, 4:55 PM
brad requested review of this revision.Jun 17 2022, 4:55 PM
MaskRay accepted this revision.Jun 17 2022, 5:03 PM

Please add a test.

clang/lib/Driver/ToolChains/OpenBSD.cpp
159

isRISCV

If OpenBSD gets riscv32, it'd need -X, too.

This revision is now accepted and ready to land.Jun 17 2022, 5:03 PM
brad added a comment.Jun 17 2022, 5:07 PM

I will add a test.

clang/lib/Driver/ToolChains/OpenBSD.cpp
159

There is no interest in further 32-bit archs.

brad updated this revision to Diff 438070.Jun 17 2022, 5:14 PM

Add a test.

brad updated this revision to Diff 438071.Jun 17 2022, 5:16 PM

Minus the new white space.

brad updated this revision to Diff 438075.Jun 17 2022, 5:21 PM

Fix the test.

MaskRay added inline comments.Jun 17 2022, 5:53 PM
clang/test/Driver/openbsd.c
133

It's useful to check other values like the -m emulation and the dynamic linker.

brad added inline comments.Jun 18 2022, 2:47 PM
clang/test/Driver/openbsd.c
133

The dynamic linker flags are tested further up in openbsd.c. The driver currently does not pass back the emulation flag.

This revision was landed with ongoing or failed builds.Jun 18 2022, 2:59 PM
This revision was automatically updated to reflect the committed changes.