make/hotspot/lib/JvmFeatures.gmk
author darcy
Tue, 12 Nov 2019 10:45:23 -0800
changeset 59037 3d2575331a41
parent 54927 1512d88b24c6
child 59053 ba6c248cae19
permissions -rw-r--r--
8233940: Preview API tests for String methods should use ${jdk.version} as -source arg Reviewed-by: jlaskey, jlahoda
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     1
#
54292
c31faeacf00a 8204552: NMT: Separate thread stack tracking from virtual memory tracking
zgu
parents: 54250
diff changeset
     2
# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     4
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    10
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    15
# accompanied this code).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    16
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    20
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    23
# questions.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    24
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    25
47314
743814386712 8188814: Simplify IncludeCustomExtension
ihse
parents: 47217
diff changeset
    26
$(eval $(call IncludeCustomExtension, hotspot/lib/JvmFeatures.gmk))
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    27
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    28
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    29
# Setup CFLAGS and EXCLUDES for the libjvm compilation, depending on which
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    30
# jvm features are selected for this jvm variant.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    31
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    32
ifeq ($(call check-jvm-feature, compiler1), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    33
  JVM_CFLAGS_FEATURES += -DCOMPILER1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    34
else
49906
4bb58f644e4e 8201543: Modularize C1 GC barriers
eosterlund
parents: 47884
diff changeset
    35
  JVM_EXCLUDE_PATTERNS += c1_ c1/
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    36
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    37
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    38
ifeq ($(call check-jvm-feature, compiler2), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    39
  JVM_CFLAGS_FEATURES += -DCOMPILER2
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    40
  JVM_SRC_DIRS += $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    41
else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    42
  JVM_EXCLUDES += opto libadt
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    43
  JVM_EXCLUDE_FILES += bcEscapeAnalyzer.cpp ciTypeFlow.cpp
50188
531b4069637e 8203454: Minimal, Zero builds fail after JDK-8202377 (Modularize C2 barriers)
shade
parents: 50113
diff changeset
    44
  JVM_EXCLUDE_PATTERNS += c2_ runtime_ /c2/
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    45
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    46
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    47
ifeq ($(call check-jvm-feature, zero), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    48
  JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    49
  JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
54250
601326fead41 8221179: Zero builds fail when linking with gold and bundling libffi.so
erikj
parents: 53683
diff changeset
    50
  ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
601326fead41 8221179: Zero builds fail when linking with gold and bundling libffi.so
erikj
parents: 53683
diff changeset
    51
    JVM_LDFLAGS_FEATURES += $(call SET_EXECUTABLE_ORIGIN,/..)
601326fead41 8221179: Zero builds fail when linking with gold and bundling libffi.so
erikj
parents: 53683
diff changeset
    52
  endif
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
    53
  ifeq ($(call isTargetCpu, sparcv9), true)
47547
0f7dce1e7690 8186578: Zero fails to build on linux-sparc due to sparc-specific code
glaubitz
parents: 47217
diff changeset
    54
    BUILD_LIBJVM_EXTRA_FILES := $(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
0f7dce1e7690 8186578: Zero fails to build on linux-sparc due to sparc-specific code
glaubitz
parents: 47217
diff changeset
    55
  endif
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    56
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    58
ifeq ($(call check-jvm-feature, minimal), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    59
  JVM_CFLAGS_FEATURES += -DMINIMAL_JVM -DVMTYPE=\"Minimal\"
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
    60
  ifeq ($(call isTargetOs, linux), true)
41674
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 38097
diff changeset
    61
    # Override the default -g with a more liberal strip policy for the minimal JVM
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 38097
diff changeset
    62
    JVM_STRIPFLAGS := --strip-unneeded
8ff2f216109b 8164120: The minimal VM should be stripped using --strip-unneeded
erikj
parents: 38097
diff changeset
    63
  endif
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    64
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    65
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
ifeq ($(call check-jvm-feature, dtrace), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
  JVM_CFLAGS_FEATURES += -DDTRACE_ENABLED
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    70
ifeq ($(call check-jvm-feature, static-build), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    71
  JVM_CFLAGS_FEATURES += -DSTATIC_BUILD=1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
ifneq ($(call check-jvm-feature, jvmti), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
  JVM_CFLAGS_FEATURES += -DINCLUDE_JVMTI=0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
  JVM_EXCLUDE_FILES += jvmtiGetLoadedClasses.cpp jvmtiThreadState.cpp jvmtiExtensions.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
      jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
      jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
      jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
      jvmtiClassFileReconstituter.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
ifneq ($(call check-jvm-feature, jvmci), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
  JVM_CFLAGS_FEATURES += -DINCLUDE_JVMCI=0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
  JVM_EXCLUDES += jvmci
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
  JVM_EXCLUDE_FILES += jvmciCodeInstaller_$(HOTSPOT_TARGET_CPU_ARCH).cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    89
ifneq ($(call check-jvm-feature, vm-structs), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
  JVM_CFLAGS_FEATURES += -DINCLUDE_VM_STRUCTS=0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
  JVM_EXCLUDE_FILES += vmStructs.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
ifneq ($(call check-jvm-feature, jni-check), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
  JVM_CFLAGS_FEATURES += -DINCLUDE_JNI_CHECK=0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
  JVM_EXCLUDE_FILES += jniCheck.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
ifneq ($(call check-jvm-feature, services), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
  JVM_CFLAGS_FEATURES += -DINCLUDE_SERVICES=0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
  JVM_EXCLUDE_FILES += heapDumper.cpp heapInspection.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
      attachListener_$(HOTSPOT_TARGET_OS).cpp attachListener.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
ifneq ($(call check-jvm-feature, management), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
  JVM_CFLAGS_FEATURES += -DINCLUDE_MANAGEMENT=0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
ifneq ($(call check-jvm-feature, cds), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
  JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
  JVM_EXCLUDE_FILES += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
      classListParser.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
      classLoaderExt.cpp \
54927
1512d88b24c6 8207812: Implement Dynamic CDS Archive
ccheung
parents: 54423
diff changeset
   114
      dynamicArchive.cpp \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
      filemap.cpp \
50951
b96466cdfc45 8202035: Archive the set of ModuleDescriptor and ModuleReference objects for observable system modules with unnamed initial module.
jiangli
parents: 50525
diff changeset
   116
      heapShared.cpp \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
      metaspaceShared.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
      metaspaceShared_$(HOTSPOT_TARGET_CPU).cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
      metaspaceShared_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
      sharedClassUtil.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
      sharedPathsMiscInfo.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
      systemDictionaryShared.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
      #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   124
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   126
ifneq ($(call check-jvm-feature, nmt), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
  JVM_CFLAGS_FEATURES += -DINCLUDE_NMT=0
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
  JVM_EXCLUDE_FILES += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
      memBaseline.cpp memReporter.cpp mallocTracker.cpp virtualMemoryTracker.cpp nmtCommon.cpp \
54292
c31faeacf00a 8204552: NMT: Separate thread stack tracking from virtual memory tracking
zgu
parents: 54250
diff changeset
   130
      memTracker.cpp nmtDCmd.cpp mallocSiteTable.cpp threadStackTracker.cpp
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
endif
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents: 41674
diff changeset
   132
49972
37b2446d7f86 8202552: [AOT][JVMCI] Incorrect usage of INCLUDE_JVMCI and INCLUDE_AOT
kvn
parents: 49906
diff changeset
   133
ifneq ($(call check-jvm-feature, aot), true)
37b2446d7f86 8202552: [AOT][JVMCI] Incorrect usage of INCLUDE_JVMCI and INCLUDE_AOT
kvn
parents: 49906
diff changeset
   134
  JVM_CFLAGS_FEATURES += -DINCLUDE_AOT=0
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents: 41674
diff changeset
   135
  JVM_EXCLUDE_FILES += \
50104
4ea7917929b9 8185505: AArch64: Port AOT to AArch64
aph
parents: 49982
diff changeset
   136
      compiledIC_aot_x86_64.cpp compiledIC_aot_aarch64.cpp      \
4ea7917929b9 8185505: AArch64: Port AOT to AArch64
aph
parents: 49982
diff changeset
   137
      compilerRuntime.cpp aotCodeHeap.cpp aotCompiledMethod.cpp \
4ea7917929b9 8185505: AArch64: Port AOT to AArch64
aph
parents: 49982
diff changeset
   138
      aotLoader.cpp compiledIC_aot.cpp
42650
1f304d0c888b 8171008: Integrate AOT compiler into JDK
kvn
parents: 41674
diff changeset
   139
endif
49982
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   140
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   141
ifneq ($(call check-jvm-feature, cmsgc), true)
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   142
  JVM_CFLAGS_FEATURES += -DINCLUDE_CMSGC=0
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   143
  JVM_EXCLUDE_PATTERNS += gc/cms
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   144
endif
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   145
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   146
ifneq ($(call check-jvm-feature, g1gc), true)
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   147
  JVM_CFLAGS_FEATURES += -DINCLUDE_G1GC=0
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   148
  JVM_EXCLUDE_PATTERNS += gc/g1
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   149
endif
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   150
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   151
ifneq ($(call check-jvm-feature, parallelgc), true)
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   152
  JVM_CFLAGS_FEATURES += -DINCLUDE_PARALLELGC=0
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   153
  JVM_EXCLUDE_PATTERNS += gc/parallel
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   154
endif
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   155
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   156
ifneq ($(call check-jvm-feature, serialgc), true)
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   157
  JVM_CFLAGS_FEATURES += -DINCLUDE_SERIALGC=0
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   158
  JVM_EXCLUDE_PATTERNS += gc/serial
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   159
  # If serial is disabled, we cannot use serial as OldGC in parallel
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   160
  JVM_EXCLUDE_FILES += psMarkSweep.cpp psMarkSweepDecorator.cpp
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents: 49972
diff changeset
   161
endif
50113
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 50104
diff changeset
   162
50523
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents: 50188
diff changeset
   163
ifneq ($(call check-jvm-feature, epsilongc), true)
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents: 50188
diff changeset
   164
  JVM_CFLAGS_FEATURES += -DINCLUDE_EPSILONGC=0
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents: 50188
diff changeset
   165
  JVM_EXCLUDE_PATTERNS += gc/epsilon
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents: 50188
diff changeset
   166
endif
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents: 50188
diff changeset
   167
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents: 50523
diff changeset
   168
ifneq ($(call check-jvm-feature, zgc), true)
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents: 50523
diff changeset
   169
  JVM_CFLAGS_FEATURES += -DINCLUDE_ZGC=0
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents: 50523
diff changeset
   170
  JVM_EXCLUDE_PATTERNS += gc/z
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents: 50523
diff changeset
   171
endif
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents: 50523
diff changeset
   172
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50951
diff changeset
   173
ifneq ($(call check-jvm-feature, shenandoahgc), true)
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50951
diff changeset
   174
  JVM_CFLAGS_FEATURES += -DINCLUDE_SHENANDOAHGC=0
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50951
diff changeset
   175
  JVM_EXCLUDE_PATTERNS += gc/shenandoah
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50951
diff changeset
   176
endif
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 50951
diff changeset
   177
50113
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 50104
diff changeset
   178
ifneq ($(call check-jvm-feature, jfr), true)
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 50104
diff changeset
   179
  JVM_CFLAGS_FEATURES += -DINCLUDE_JFR=0
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 50104
diff changeset
   180
  JVM_EXCLUDE_PATTERNS += jfr
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 50104
diff changeset
   181
endif
caf115bb98ad 8199712: Flight Recorder
egahlin
parents: 50104
diff changeset
   182
42664
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   183
################################################################################
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   184
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   185
ifeq ($(call check-jvm-feature, link-time-opt), true)
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   186
  # NOTE: Disable automatic opimization level and let the explicit cflag control
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   187
  # optimization level instead. This activates O3 on slowdebug builds, just
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   188
  # like the old build, but it's probably not right.
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   189
  JVM_OPTIMIZATION :=
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   190
  JVM_CFLAGS_FEATURES += -O3 -flto
47884
3cfab71d6c81 8190284: link-time-opt should not be using -fwhole-program
ihse
parents: 47687
diff changeset
   191
  JVM_LDFLAGS_FEATURES += -O3 -flto -fuse-linker-plugin -fno-strict-aliasing
42664
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   192
endif
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   193
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   194
ifeq ($(call check-jvm-feature, minimal), true)
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   195
  ifeq ($(call check-jvm-feature, link-time-opt), false)
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   196
    JVM_OPTIMIZATION := SIZE
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   197
    OPT_SPEED_SRC := \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   198
        allocation.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   199
        assembler.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   200
        assembler_linux_arm.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   201
        barrierSet.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   202
        basicLock.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   203
        biasedLocking.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   204
        bytecode.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   205
        bytecodeInterpreter.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   206
        bytecodeInterpreter_x86.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   207
        c1_Compilation.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   208
        c1_Compiler.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   209
        c1_GraphBuilder.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   210
        c1_LinearScan.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   211
        c1_LIR.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   212
        ciEnv.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   213
        ciObjectFactory.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   214
        codeBlob.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   215
        constantPool.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   216
        constMethod.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   217
        classLoader.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   218
        classLoaderData.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   219
        classFileParser.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   220
        classFileStream.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   221
        cpCache.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   222
        defNewGeneration.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   223
        frame_arm.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   224
        genCollectedHeap.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   225
        generation.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   226
        genMarkSweep.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   227
        growableArray.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   228
        handles.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   229
        hashtable.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   230
        heap.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   231
        icache.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   232
        icache_arm.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   233
        instanceKlass.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   234
        invocationCounter.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   235
        iterator.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   236
        javaCalls.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   237
        javaClasses.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   238
        jniFastGetField_arm.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   239
        jvm.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   240
        jvm_linux.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   241
        linkResolver.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   242
        klass.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   243
        klassVtable.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   244
        markSweep.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   245
        memRegion.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   246
        memoryPool.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   247
        method.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   248
        methodHandles.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   249
        methodHandles_arm.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   250
        methodLiveness.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   251
        metablock.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   252
        metaspace.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   253
        mutex.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   254
        mutex_linux.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   255
        mutexLocker.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   256
        nativeLookup.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   257
        objArrayKlass.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   258
        os_linux.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   259
        os_linux_arm.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   260
        placeHolders.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   261
        quickSort.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   262
        resourceArea.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   263
        rewriter.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   264
        sharedRuntime.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   265
        signature.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   266
        space.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   267
        stackMapTable.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   268
        symbolTable.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   269
        systemDictionary.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   270
        symbol.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   271
        synchronizer.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   272
        threadLS_bsd_x86.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   273
        threadLS_linux_arm.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   274
        threadLS_linux_x86.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   275
        timer.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   276
        typeArrayKlass.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   277
        unsafe.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   278
        utf8.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   279
        vmSymbols.cpp \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   280
        #
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   281
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   282
    $(foreach s, $(OPT_SPEED_SRC), \
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   283
        $(eval BUILD_LIBJVM_$s_OPTIMIZATION := HIGHEST_JVM))
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   284
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   285
    BUILD_LIBJVM_systemDictionary.cpp_CXXFLAGS := -fno-optimize-sibling-calls
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   286
  endif
29142a56c193 8168503: JEP 297: Unified arm32/arm64 Port
bobv
parents: 42650
diff changeset
   287
endif