From 4635351b1570fcea07fac1ece5f76f528d68c2a7 Mon Sep 17 00:00:00 2001 From: Thomas Schatzl Date: Fri, 25 Oct 2024 07:16:52 +0000 Subject: [PATCH] 8342939: Building ZGC without compiler2 fails Reviewed-by: eosterlund, mli, kvn --- src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp index bc51a2b4468..3795b1fc176 100644 --- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp @@ -363,8 +363,12 @@ static void emit_store_fast_path_check_c2(MacroAssembler* masm, Address ref_addr } static bool is_c2_compilation() { +#ifdef COMPILER2 CompileTask* task = ciEnv::current()->task(); return task != nullptr && is_c2_compile(task->comp_level()); +#else + return false; +#endif } void ZBarrierSetAssembler::store_barrier_fast(MacroAssembler* masm,