155 ifneq ($(call check-jvm-feature, serialgc), true)
156 JVM_CFLAGS_FEATURES += -DINCLUDE_SERIALGC=0
157 JVM_EXCLUDE_PATTERNS += gc/serial
158 # If serial is disabled, we cannot use serial as OldGC in parallel
159 JVM_EXCLUDE_FILES += psMarkSweep.cpp psMarkSweepDecorator.cpp
160 endif
161
162 ifneq ($(call check-jvm-feature, epsilongc), true)
163 JVM_CFLAGS_FEATURES += -DINCLUDE_EPSILONGC=0
164 JVM_EXCLUDE_PATTERNS += gc/epsilon
165 endif
166
167 ifneq ($(call check-jvm-feature, zgc), true)
168 JVM_CFLAGS_FEATURES += -DINCLUDE_ZGC=0
169 JVM_EXCLUDE_PATTERNS += gc/z
170 endif
171
172 ifneq ($(call check-jvm-feature, shenandoahgc), true)
173 JVM_CFLAGS_FEATURES += -DINCLUDE_SHENANDOAHGC=0
174 JVM_EXCLUDE_PATTERNS += gc/shenandoah
175 else
176 JVM_CFLAGS_FEATURES += -DSUPPORT_BARRIER_ON_PRIMITIVES -DSUPPORT_NOT_TO_SPACE_INVARIANT
177 endif
178
179 ifneq ($(call check-jvm-feature, jfr), true)
180 JVM_CFLAGS_FEATURES += -DINCLUDE_JFR=0
181 JVM_EXCLUDE_PATTERNS += jfr
182 endif
183
184 ################################################################################
185
186 ifeq ($(call check-jvm-feature, link-time-opt), true)
187 # NOTE: Disable automatic opimization level and let the explicit cflag control
188 # optimization level instead. This activates O3 on slowdebug builds, just
189 # like the old build, but it's probably not right.
190 JVM_OPTIMIZATION :=
191 JVM_CFLAGS_FEATURES += -O3 -flto
192 JVM_LDFLAGS_FEATURES += -O3 -flto -fuse-linker-plugin -fno-strict-aliasing
193 endif
194
195 ifeq ($(call check-jvm-feature, minimal), true)
196 ifeq ($(call check-jvm-feature, link-time-opt), false)
|
155 ifneq ($(call check-jvm-feature, serialgc), true)
156 JVM_CFLAGS_FEATURES += -DINCLUDE_SERIALGC=0
157 JVM_EXCLUDE_PATTERNS += gc/serial
158 # If serial is disabled, we cannot use serial as OldGC in parallel
159 JVM_EXCLUDE_FILES += psMarkSweep.cpp psMarkSweepDecorator.cpp
160 endif
161
162 ifneq ($(call check-jvm-feature, epsilongc), true)
163 JVM_CFLAGS_FEATURES += -DINCLUDE_EPSILONGC=0
164 JVM_EXCLUDE_PATTERNS += gc/epsilon
165 endif
166
167 ifneq ($(call check-jvm-feature, zgc), true)
168 JVM_CFLAGS_FEATURES += -DINCLUDE_ZGC=0
169 JVM_EXCLUDE_PATTERNS += gc/z
170 endif
171
172 ifneq ($(call check-jvm-feature, shenandoahgc), true)
173 JVM_CFLAGS_FEATURES += -DINCLUDE_SHENANDOAHGC=0
174 JVM_EXCLUDE_PATTERNS += gc/shenandoah
175 endif
176
177 ifneq ($(call check-jvm-feature, jfr), true)
178 JVM_CFLAGS_FEATURES += -DINCLUDE_JFR=0
179 JVM_EXCLUDE_PATTERNS += jfr
180 endif
181
182 ################################################################################
183
184 ifeq ($(call check-jvm-feature, link-time-opt), true)
185 # NOTE: Disable automatic opimization level and let the explicit cflag control
186 # optimization level instead. This activates O3 on slowdebug builds, just
187 # like the old build, but it's probably not right.
188 JVM_OPTIMIZATION :=
189 JVM_CFLAGS_FEATURES += -O3 -flto
190 JVM_LDFLAGS_FEATURES += -O3 -flto -fuse-linker-plugin -fno-strict-aliasing
191 endif
192
193 ifeq ($(call check-jvm-feature, minimal), true)
194 ifeq ($(call check-jvm-feature, link-time-opt), false)
|