This is an archive of the discontinued LLVM Phabricator instance.

[AIX][llvm-go] AIX linker does not recognize `-rpath`
ClosedPublic

Authored by stevewan on Nov 11 2021, 11:43 AM.

Details

Summary

The existing logic adds -rpath to CGO_LDFLAGS, which is not a valid linker option on AIX. This patch substitutes it with -blibpath on AIX.

Diff Detail

Event Timeline

stevewan requested review of this revision.Nov 11 2021, 11:43 AM
stevewan created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2021, 11:43 AM
daltenty accepted this revision.Nov 15 2021, 7:48 AM

LGTM, with minor nit

llvm/tools/llvm-go/llvm-go.go
106

nit: an if-elseif would be cleaner than the nested if here:
if runtime.GOOS == "aix" {
...
}
else if runtime.GOOS != "darwin" {
...
}

This revision is now accepted and ready to land.Nov 15 2021, 7:48 AM
stevewan updated this revision to Diff 387305.Nov 15 2021, 9:56 AM

Flatten nested if

stevewan updated this revision to Diff 387313.Nov 15 2021, 10:10 AM

Fix formatting

stevewan marked an inline comment as done.Nov 15 2021, 10:11 AM
This revision was landed with ongoing or failed builds.Nov 15 2021, 10:13 AM
This revision was automatically updated to reflect the committed changes.