Skip to content

Commit cfb6002

Browse files
gbaralditopolarity
andauthored
Change init_julia slightly to adapt to 1.12 changes (#1047)
* Change init_julia slightly to adapt to 1.12 changes * Enable 1.12 CI * 1.12 changes * Fix binding access * Update src/embedding_wrapper.c --------- Co-authored-by: Cody Tapscott <[email protected]>
1 parent 2d2e8b3 commit cfb6002

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ jobs:
5151
julia-version:
5252
- '1.10' # current LTS
5353
- '1.11' # current stable
54+
5455
#
5556
# 'pre' will install the latest prerelease build (RCs, betas, and alphas).
5657
# Uncomment this line when there is an active prerelease available.
5758
# Comment this line out when there is no prerelease available (to save CI time).
58-
# - 'pre'
59+
- 'pre'
5960
#
6061
# Note: we have a separate workflow (.github/workflows/ci.nightly.yml)
6162
# for Julia nightly.

src/embedding_wrapper.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ int main(int argc, char *argv[]) {
120120
jl_value_t *firstarg = checked_eval_string("popfirst!(ARGS)");
121121
JL_GC_PUSH1(&firstarg);
122122
jl_sym_t *var = jl_symbol("PROGRAM_FILE");
123-
#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11
123+
#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 12
124+
jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var);
125+
jl_checked_assignment(bp, jl_base_module, var, firstarg);
126+
#elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 11
124127
jl_binding_t *bp = jl_get_binding_wr(jl_base_module, var, /* alloc */ 1);
125128
jl_checked_assignment(bp, jl_base_module, var, firstarg);
126129
#elif JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 10

src/julia_init.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,12 @@ void init_julia(int argc, char **argv) {
6969
char *root_dir = dirname(dirname(_sysimage_path));
7070
set_depot_load_path(root_dir);
7171
free(_sysimage_path);
72-
7372
jl_options.image_file = sysimage_path;
73+
#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR <= 11
7474
julia_init(JL_IMAGE_CWD);
75+
#else
76+
jl_init_with_image_file(NULL, sysimage_path);
77+
#endif
7578
}
7679

7780
void shutdown_julia(int retcode) { jl_atexit_hook(retcode); }

src/library_selection.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const jll_mapping = Dict(
99
"nghttp2_jll" => ["libnghttp2"],
1010
"LibGit2_jll" => ["libgit2"],
1111
"SuiteSparse_jll" => ["libamd", "libbtf", "libcamd", "libccolamd", "libcholmod", "libcolamd", "libklu", "libldl", "librbio", "libspqr", "libsuitesparseconfig", "libumfpack"],
12+
"OpenSSL_jll" => ["libcrypto", "libssl"],
1213
)
1314

1415
# Manually fixup of libLLVM

0 commit comments

Comments
 (0)