rev 47445 : 8171853: Remove Shark compiler

   1 #
   2 # Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 $(eval $(call IncludeCustomExtension, hotspot/lib/JvmFeatures.gmk))
  27 
  28 ################################################################################
  29 # Setup CFLAGS and EXCLUDES for the libjvm compilation, depending on which
  30 # jvm features are selected for this jvm variant.
  31 
  32 ifeq ($(call check-jvm-feature, compiler1), true)
  33   JVM_CFLAGS_FEATURES += -DCOMPILER1
  34 else
  35   JVM_EXCLUDE_PATTERNS += c1_
  36 endif
  37 
  38 ifeq ($(call check-jvm-feature, compiler2), true)
  39   JVM_CFLAGS_FEATURES += -DCOMPILER2
  40   JVM_SRC_DIRS += $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles
  41 else
  42   JVM_EXCLUDES += opto libadt
  43   JVM_EXCLUDE_FILES += bcEscapeAnalyzer.cpp ciTypeFlow.cpp
  44   JVM_EXCLUDE_PATTERNS += c2_ runtime_
  45 endif
  46 
  47 ifeq ($(call check-jvm-feature, zero), true)
  48   JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
  49   JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
  50   ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
  51     BUILD_LIBJVM_EXTRA_FILES := $(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
  52   endif
  53 endif
  54 








  55 ifeq ($(call check-jvm-feature, minimal), true)
  56   JVM_CFLAGS_FEATURES += -DMINIMAL_JVM -DVMTYPE=\"Minimal\"
  57   ifeq ($(OPENJDK_TARGET_OS), linux)
  58     # Override the default -g with a more liberal strip policy for the minimal JVM
  59     JVM_STRIPFLAGS := --strip-unneeded
  60   endif
  61 endif
  62 
  63 ifeq ($(call check-jvm-feature, dtrace), true)
  64   JVM_CFLAGS_FEATURES += -DDTRACE_ENABLED
  65 endif
  66 
  67 ifeq ($(call check-jvm-feature, static-build), true)
  68   JVM_CFLAGS_FEATURES += -DSTATIC_BUILD=1
  69 endif
  70 
  71 ifneq ($(call check-jvm-feature, jvmti), true)
  72   JVM_CFLAGS_FEATURES += -DINCLUDE_JVMTI=0
  73   JVM_EXCLUDE_FILES += jvmtiGetLoadedClasses.cpp jvmtiThreadState.cpp jvmtiExtensions.cpp \
  74       jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \
  75       jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \
  76       jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp \
  77       jvmtiClassFileReconstituter.cpp
  78 endif
  79 
  80 ifneq ($(call check-jvm-feature, jvmci), true)
  81   JVM_CFLAGS_FEATURES += -DINCLUDE_JVMCI=0
  82   JVM_EXCLUDES += jvmci
  83   JVM_EXCLUDE_FILES += jvmciCodeInstaller_$(HOTSPOT_TARGET_CPU_ARCH).cpp
  84 endif
  85 
  86 ifneq ($(call check-jvm-feature, vm-structs), true)
  87   JVM_CFLAGS_FEATURES += -DINCLUDE_VM_STRUCTS=0
  88   JVM_EXCLUDE_FILES += vmStructs.cpp
  89 endif
  90 
  91 ifneq ($(call check-jvm-feature, jni-check), true)
  92   JVM_CFLAGS_FEATURES += -DINCLUDE_JNI_CHECK=0
  93   JVM_EXCLUDE_FILES += jniCheck.cpp
  94 endif
  95 
  96 ifneq ($(call check-jvm-feature, services), true)
  97   JVM_CFLAGS_FEATURES += -DINCLUDE_SERVICES=0
  98   JVM_EXCLUDE_FILES += heapDumper.cpp heapInspection.cpp \
  99       attachListener_$(HOTSPOT_TARGET_OS).cpp attachListener.cpp
 100 endif
 101 
 102 ifneq ($(call check-jvm-feature, management), true)
 103   JVM_CFLAGS_FEATURES += -DINCLUDE_MANAGEMENT=0
 104 endif
 105 
 106 ifneq ($(call check-jvm-feature, cds), true)
 107   JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
 108   JVM_EXCLUDE_FILES += \
 109       classListParser.cpp \
 110       classLoaderExt.cpp \
 111       filemap.cpp \
 112       metaspaceShared.cpp \
 113       metaspaceShared_$(HOTSPOT_TARGET_CPU).cpp \
 114       metaspaceShared_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
 115       sharedClassUtil.cpp \
 116       sharedPathsMiscInfo.cpp \
 117       systemDictionaryShared.cpp \
 118       #
 119 endif
 120 
 121 ifneq ($(call check-jvm-feature, all-gcs), true)
 122   JVM_CFLAGS_FEATURES += -DINCLUDE_ALL_GCS=0
 123   JVM_EXCLUDE_PATTERNS += \
 124       cms/ g1/ parallel/
 125   JVM_EXCLUDE_FILES += \
 126       concurrentGCThread.cpp \
 127       plab.cpp
 128   JVM_EXCLUDE_FILES += \
 129       g1MemoryPool.cpp \
 130       psMemoryPool.cpp
 131 endif
 132 
 133 ifneq ($(call check-jvm-feature, nmt), true)
 134   JVM_CFLAGS_FEATURES += -DINCLUDE_NMT=0
 135   JVM_EXCLUDE_FILES += \
 136       memBaseline.cpp memReporter.cpp mallocTracker.cpp virtualMemoryTracker.cpp nmtCommon.cpp \
 137       memTracker.cpp nmtDCmd.cpp mallocSiteTable.cpp
 138 endif
 139 
 140 ifeq ($(call check-jvm-feature, aot), true)
 141   JVM_CFLAGS_FEATURES += -DINCLUDE_AOT
 142 else
 143   JVM_EXCLUDE_FILES += \
 144       compiledIC_aot_x86_64.cpp compilerRuntime.cpp \
 145       aotCodeHeap.cpp aotCompiledMethod.cpp aotLoader.cpp compiledIC_aot.cpp
 146 endif
 147 ################################################################################
 148 
 149 ifeq ($(call check-jvm-feature, link-time-opt), true)
 150   # NOTE: Disable automatic opimization level and let the explicit cflag control
 151   # optimization level instead. This activates O3 on slowdebug builds, just
 152   # like the old build, but it's probably not right.
 153   JVM_OPTIMIZATION :=
 154   JVM_CFLAGS_FEATURES += -O3 -flto
 155   JVM_LDFLAGS_FEATURES += -O3 -flto -fwhole-program -fno-strict-aliasing
 156 endif
 157 
 158 ifeq ($(call check-jvm-feature, minimal), true)
 159   ifeq ($(call check-jvm-feature, link-time-opt), false)
 160     JVM_OPTIMIZATION := SIZE
 161     OPT_SPEED_SRC := \
 162         allocation.cpp \
 163         assembler.cpp \
 164         assembler_linux_arm.cpp \
 165         barrierSet.cpp \
 166         basicLock.cpp \
 167         biasedLocking.cpp \
 168         bytecode.cpp \
 169         bytecodeInterpreter.cpp \
 170         bytecodeInterpreter_x86.cpp \
 171         c1_Compilation.cpp \
 172         c1_Compiler.cpp \
 173         c1_GraphBuilder.cpp \
 174         c1_LinearScan.cpp \
 175         c1_LIR.cpp \
 176         ciEnv.cpp \
 177         ciObjectFactory.cpp \
 178         codeBlob.cpp \
 179         constantPool.cpp \
 180         constMethod.cpp \
 181         classLoader.cpp \
 182         classLoaderData.cpp \
 183         classFileParser.cpp \
 184         classFileStream.cpp \
 185         cpCache.cpp \
 186         defNewGeneration.cpp \
 187         frame_arm.cpp \
 188         genCollectedHeap.cpp \
 189         generation.cpp \
 190         genMarkSweep.cpp \
 191         growableArray.cpp \
 192         handles.cpp \
 193         hashtable.cpp \
 194         heap.cpp \
 195         icache.cpp \
 196         icache_arm.cpp \
 197         instanceKlass.cpp \
 198         invocationCounter.cpp \
 199         iterator.cpp \
 200         javaCalls.cpp \
 201         javaClasses.cpp \
 202         jniFastGetField_arm.cpp \
 203         jvm.cpp \
 204         jvm_linux.cpp \
 205         linkResolver.cpp \
 206         klass.cpp \
 207         klassVtable.cpp \
 208         markSweep.cpp \
 209         memRegion.cpp \
 210         memoryPool.cpp \
 211         method.cpp \
 212         methodHandles.cpp \
 213         methodHandles_arm.cpp \
 214         methodLiveness.cpp \
 215         metablock.cpp \
 216         metaspace.cpp \
 217         mutex.cpp \
 218         mutex_linux.cpp \
 219         mutexLocker.cpp \
 220         nativeLookup.cpp \
 221         objArrayKlass.cpp \
 222         os_linux.cpp \
 223         os_linux_arm.cpp \
 224         placeHolders.cpp \
 225         quickSort.cpp \
 226         resourceArea.cpp \
 227         rewriter.cpp \
 228         sharedRuntime.cpp \
 229         signature.cpp \
 230         space.cpp \
 231         stackMapTable.cpp \
 232         symbolTable.cpp \
 233         systemDictionary.cpp \
 234         symbol.cpp \
 235         synchronizer.cpp \
 236         threadLS_bsd_x86.cpp \
 237         threadLS_linux_arm.cpp \
 238         threadLS_linux_x86.cpp \
 239         timer.cpp \
 240         typeArrayKlass.cpp \
 241         unsafe.cpp \
 242         utf8.cpp \
 243         vmSymbols.cpp \
 244         #
 245 
 246     $(foreach s, $(OPT_SPEED_SRC), \
 247         $(eval BUILD_LIBJVM_$s_OPTIMIZATION := HIGHEST_JVM))
 248 
 249     BUILD_LIBJVM_systemDictionary.cpp_CXXFLAGS := -fno-optimize-sibling-calls
 250   endif
 251 endif
--- EOF ---