[PATCH] D113704: [AIX][llvm-go] AIX linker does not recognize `-rpath`
Steven Wan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 15 10:13:33 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG351870720fcb: [AIX][llvm-go] AIX linker does not recognize `-rpath` (authored by stevewan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113704/new/
https://reviews.llvm.org/D113704
Files:
llvm/tools/llvm-go/llvm-go.go
Index: llvm/tools/llvm-go/llvm-go.go
===================================================================
--- llvm/tools/llvm-go/llvm-go.go
+++ llvm/tools/llvm-go/llvm-go.go
@@ -96,7 +96,11 @@
// needed to resolve dependent symbols
stdLibOption = "-stdlib=libc++"
}
- if runtime.GOOS != "darwin" {
+ if runtime.GOOS == "aix" {
+ // AIX linker does not honour `-rpath`, the closest substitution
+ // is `-blibpath`
+ ldflags = "-Wl,-blibpath:" + llvmConfig("--libdir") + " " + ldflags
+ } else if runtime.GOOS != "darwin" {
// OS X doesn't like -rpath with cgo. See:
// https://github.com/golang/go/issues/7293
ldflags = "-Wl,-rpath," + llvmConfig("--libdir") + " " + ldflags
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113704.387317.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211115/8c584bfa/attachment.bin>
More information about the llvm-commits
mailing list