From 106f5be7d68bf048ffa6ea389ade320f9865aae6 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Fri, 30 Dec 2022 23:38:25 +0100 Subject: [PATCH] Adjust assertion for pkgimage & code-coverage (#48036) (cherry picked from commit cc5bc87b005ee193bd22b2907d591f120371a26b) --- src/coverage.cpp | 2 +- src/jitlayers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coverage.cpp b/src/coverage.cpp index 0dfb903798bfa..2be064726b1fe 100644 --- a/src/coverage.cpp +++ b/src/coverage.cpp @@ -17,7 +17,7 @@ using namespace llvm; static int codegen_imaging_mode(void) { - return jl_options.image_codegen || jl_generating_output(); + return jl_options.image_codegen || (jl_generating_output() && jl_options.use_pkgimages); } // Logging for code coverage and memory allocation diff --git a/src/jitlayers.h b/src/jitlayers.h index bad5a91cad6c5..a496cba5bef79 100644 --- a/src/jitlayers.h +++ b/src/jitlayers.h @@ -73,7 +73,7 @@ GlobalVariable *jl_emit_RTLD_DEFAULT_var(Module *M); DataLayout jl_create_datalayout(TargetMachine &TM); static inline bool imaging_default() { - return jl_options.image_codegen || jl_generating_output(); + return jl_options.image_codegen || (jl_generating_output() && jl_options.use_pkgimages); } struct OptimizationOptions {