Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib: add --relative-rpath option to juliac.jl #57199

Merged
merged 3 commits into from
Jan 31, 2025
Merged

Conversation

topolarity
Copy link
Member

This flag is useful when you'd like to deploy the generated library / executable across machines. This will tell the linker to look for the required libraries (libjulia*.so, libopenblas, etc.) in an adjacent julia/ directory.

We'll eventually use PackageCompiler to help bundle all the required libraries together, but for now this at least gets the lookup setup correctly in the created .so / binary.

topolarity and others added 2 commits January 29, 2025 20:35
Also change the function arguments to expose the `rpath` via a separate
function call, if desired.
Also avoid calling Julia as a separate process just to query
cflags, etc. preferring to import `julia-config.jl` as a module.

Co-authored-by: Gabriel Baraldi <[email protected]>
@topolarity topolarity added the trimming Issues with trimming functionality or PR's relevant to its performance/functionality label Jan 30, 2025
@topolarity topolarity merged commit cba19bf into master Jan 31, 2025
5 of 7 checks passed
@topolarity topolarity deleted the juliac-rpath branch January 31, 2025 22:46
if relative
if Sys.isapple()
return "-Wl,-rpath,'@loader_path/julia/' -Wl,-rpath,'@loader_path/'"
elseif Sys.islinux()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this should be Sys.isunix() instead of Sys.islinux()? It's not Linux-specific AFAICT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
trimming Issues with trimming functionality or PR's relevant to its performance/functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants