internal/build:support relocatable lib#1163
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1163 +/- ##
=======================================
Coverage 88.01% 88.01%
=======================================
Files 34 34
Lines 8374 8374
=======================================
Hits 7370 7370
Misses 935 935
Partials 69 69 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1d6462a to
daa2fc7
Compare
ccf191b to
e3d2442
Compare
e3d2442 to
92f95c5
Compare
faeb706 to
eb6ec4e
Compare
|
@cpunion need review |
|
Add a |
|
Make all homebrew tests pass to trigger prebuilt binaries tests |
Current testing requires a real environment since llgo uses cjson dylib with @rpath install name, but storing dynamic libraries in the repo is clearly not ideal. We could directly use the precompiled libraries from llpkg/cjsonv1.0.0 release for testing https://github.com/goplus/llpkg/releases/tag/cjson%2Fv1.0.0 , which avoids installing conan in test environments and saves the time overhead of downloading dependencies through conan. this release is prefix with @rpath which is current pr need support cjson_darwin_arm64/lib
❯ otool -D ./libcjson.dylib
./libcjson.dylib:
@rpath/libcjson.1.dylib |
I Just merge the main code,and squash my homebrew test'commit to pass commit style check, with the new check process llgo build fail https://github.com/Homebrew/homebrew-core/actions/runs/17058628559/job/48361297264?pr=227010 ,because the go1.25 is released. |
Maybe lock go to |
|
okay, i will upload a |
001b979 to
a3a375e
Compare
llgo at homebrew current locked at depend go1.24 Homebrew/homebrew-core#234050
And have test the |
a3a375e to
1d76f51
Compare
|
And the homebrew test after lock go1.24 ,with this pr update ,is pass correctly Homebrew/homebrew-core#227010 |
fixed #1135
reason
library with conan with generate install_name directly with
@rpathand the go is not add rpath for these dylib.resolution
Treat every link-time library search path, specified by the -L parameter, as a runtime search path as well.This is to ensure the final executable can locate libraries with a relocatable install_name (e.g., "@rpath/libfoo.dylib") at runtime.
current run normally