From f562ad06f49917ef26902f06f6ad1bcb19522d54 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 30 Mar 2022 05:06:31 +0200 Subject: [PATCH] Initialize jl_page_size when not calling julia_init. (#44699) If we load libjulia-codegen directly, e.g. from opt or llc, we don't call julia_init but init_llvm. Co-authored-by: Keno Fischer --- src/codegen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/codegen.cpp b/src/codegen.cpp index 60fcfa8ab5be1..576d5486d4fa7 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8269,6 +8269,7 @@ void jl_init_debuginfo(void); extern "C" void jl_init_llvm(void) { + jl_page_size = jl_getpagesize(); jl_default_debug_info_kind = (int) DICompileUnit::DebugEmissionKind::FullDebug; imaging_mode = jl_options.image_codegen || (jl_generating_output() && !jl_options.incremental); jl_default_cgparams.generic_context = jl_nothing;