-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
use the correct path to include Compiler.jl in release builds #56601
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -266,6 +266,21 @@ function strcat(x::String, y::String) | |||
| return out | ||||
| end | ||||
|
|
||||
| function file_exists(filename::String) | ||||
| file = ccall( | ||||
| (:fopen, "libc"), | ||||
| Ptr{Cvoid}, | ||||
| (Ptr{UInt8}, Ptr{UInt8}), | ||||
| filename, "r" | ||||
| ) | ||||
| if file != C_NULL | ||||
| ccall((:fclose, "libc"), Cint, (Ptr{Cvoid},), file) | ||||
| return true | ||||
| else | ||||
| return false | ||||
| end | ||||
| end | ||||
|
|
||||
| global BUILDROOT::String = "" | ||||
|
|
||||
| baremodule BuildSettings end | ||||
|
|
@@ -288,7 +303,11 @@ process_sysimg_args!() | |||
|
|
||||
| function isready end | ||||
|
|
||||
| include(strcat(BUILDROOT, "../usr/share/julia/Compiler/src/Compiler.jl")) | ||||
| if file_exists(strcat(BUILDROOT, "../usr/share/julia/Compiler/src/Compiler.jl")) | ||||
|
||||
| build_datarootdir := $(build_prefix)/share |
which could be passed in as an additional argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there's two options I think. One is to DATAROOTDIR that instead of BUILDROOT, since currently, I believe we always link DATAROOTDIR/julia/base to BUILDROOT/base, so that was what I meant above. However, on second thought, I'm not convinced that that's right at all. Various downstream packages expect the full base sources to be available in usr/share, which I imagine is broken right now for an out of tree build. That's out of the scope of this PR, but if you want to use two arguments to be robust for potential rearrangement there, I think that's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the latest commit I can build a sysimage on both a release and source with JuliaLang/PackageCompiler.jl#1002
Uh oh!
There was an error while loading. Please reload this page.