make/hotspot/lib/JvmOverrideFiles.gmk
author phh
Sat, 30 Nov 2019 14:33:05 -0800
changeset 59330 5b96c12f909d
parent 54380 e297c7bb6469
permissions -rw-r--r--
8234541: C1 emits an empty message when it inlines successfully Summary: Use "inline" as the message when successfull Reviewed-by: thartmann, mdoerr Contributed-by: navy.xliu@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     1
#
54380
e297c7bb6469 8189861: Refactor CacheFind
erikj
parents: 53683
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/JvmOverrideFiles.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
# This file contains explicit overrides of CFLAGS and/or precompiled header
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    30
# status for individual files on specific platforms.
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 ($(TOOLCHAIN_TYPE), gcc)
51738
606e039bd655 8210703: vmStructs.cpp compiled with -O0
sgehwolf
parents: 50646
diff changeset
    33
  BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments
41327
6cfeb3278721 8166096: variable tracking size limit exceeded in jvmciCompilerToVM.cpp
kvn
parents: 39392
diff changeset
    34
  BUILD_LIBJVM_jvmciCompilerToVM.cpp_CXXFLAGS := -fno-var-tracking-assignments
49371
59ad6672bf78 8199422: Hotspot build is broken after push of 8197235
kvn
parents: 49370
diff changeset
    35
  BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_CXXFLAGS := -fno-var-tracking-assignments
48838
27621e6afcc8 8187676: Disable uninitialized warnings for two files until proper fix available
erikj
parents: 47314
diff changeset
    36
  BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
49748
6a880e576856 8199417: Modularize interpreter GC barriers
eosterlund
parents: 49371
diff changeset
    37
  BUILD_LIBJVM_cardTableBarrierSetAssembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
48838
27621e6afcc8 8187676: Disable uninitialized warnings for two files until proper fix available
erikj
parents: 47314
diff changeset
    38
  BUILD_LIBJVM_interp_masm_x86.cpp_CXXFLAGS := -Wno-uninitialized
52925
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 51782
diff changeset
    39
  ifeq ($(DEBUG_LEVEL), release)
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 51782
diff changeset
    40
    # Need extra inlining to collapse all marking code into the hot marking loop
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 51782
diff changeset
    41
    BUILD_LIBJVM_shenandoahConcurrentMark.cpp_CXXFLAGS := --param inline-unit-growth=1000
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 51782
diff changeset
    42
    BUILD_LIBJVM_shenandoahTraversalGC.cpp_CXXFLAGS := --param inline-unit-growth=1000
9c18c9d839d3 8214259: Implementation: JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
rkennke
parents: 51782
diff changeset
    43
  endif
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    44
endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    45
51782
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    46
LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NONE)
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    47
# If the FDLIBM_CFLAGS variable is non-empty we know
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    48
# that the fdlibm-fork in hotspot can get optimized
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    49
# by using -ffp-contract=off on GCC/Clang platforms.
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    50
ifneq ($(FDLIBM_CFLAGS), )
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    51
  LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NORM)
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    52
endif
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    53
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
    54
ifeq ($(call isTargetOs, linux), true)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    55
  BUILD_LIBJVM_ostream.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
39392
eb15425824c3 8156181: UL: File size limit on 32 bit Linux
ysuenaga
parents: 39214
diff changeset
    56
  BUILD_LIBJVM_logFileOutput.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
51782
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    58
  BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    59
  BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    60
51782
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    61
  ifeq ($(TOOLCHAIN_TYPE), clang)
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    62
    JVM_PRECOMPILED_HEADER_EXCLUDE := \
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    63
	sharedRuntimeTrig.cpp \
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    64
	sharedRuntimeTrans.cpp \
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
    65
	#
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
    68
  ifeq ($(call isTargetCpu, x86), true)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
    # Performance measurements show that by compiling GC related code, we could
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    70
    # significantly reduce the GC pause time on 32 bit Linux/Unix platforms by
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    71
    # compiling without the PIC flag (-fPIC on linux).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
    # See 6454213 for more details.
54380
e297c7bb6469 8189861: Refactor CacheFind
erikj
parents: 53683
diff changeset
    73
    ALL_SRC := $(call FindFiles, $(TOPDIR)/src/hotspot/share, *.cpp)
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    74
    NONPIC_FILTER := $(addsuffix %, $(addprefix $(TOPDIR)/src/hotspot/share/, \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
        memory oops gc))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
    # Due to what looks like a bug in the old build implementation of this, add a
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
    # couple of more files that were accidentally matched as substrings of GC related
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
    # files.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
    NONPIC_SRC := $(filter $(NONPIC_FILTER), $(ALL_SRC)) globals.cpp location.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
    # Declare variables for each source file that needs the pic flag like this:
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
    # BUILD_JVM_<srcfile>_CXXFLAGS := -fno-PIC
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
    # This will get implicitly picked up by SetupNativeCompilation below.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
    $(foreach s, $(NONPIC_SRC), $(eval BUILD_LIBJVM_$(notdir $s)_CXXFLAGS := -fno-PIC))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
    86
else ifeq ($(call isTargetOs, solaris), true)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
  ifneq ($(DEBUG_LEVEL), slowdebug)
50646
c82ed0f373bb 8205055: Fix compilation optimization errors with new Solaris toolchain
gadams
parents: 49748
diff changeset
    88
    # dev studio 12.6 workaround
c82ed0f373bb 8205055: Fix compilation optimization errors with new Solaris toolchain
gadams
parents: 49748
diff changeset
    89
    BUILD_LIBJVM_arguments.cpp_OPTIMIZATION := LOW
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
    # Workaround for a bug in dtrace.  If ciEnv::post_compiled_method_load_event()
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
    # is inlined, the resulting dtrace object file needs a reference to this
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
    # function, whose symbol name is too long for dtrace.  So disable inlining
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
    # for this method for now. (fix this when dtrace bug 6258412 is fixed)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
    BUILD_LIBJVM_ciEnv.cpp_CXXFLAGS := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
        -xinline=no%__1cFciEnvbFpost_compiled_method_load_event6MpnHnmethod__v_
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
    # dtrace cannot handle tail call optimization (6672627, 6693876)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
    BUILD_LIBJVM_jni.cpp_CXXFLAGS := -Qoption ube -O~yz
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
    BUILD_LIBJVM_stubGenerator_$(HOTSPOT_TARGET_CPU).cpp_CXXFLAGS := -xspace
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
   100
    ifeq ($(call isTargetCpu, x86_64), true)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
      # Temporary until SS10 C++ compiler is fixed
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
      BUILD_LIBJVM_generateOptoStub.cpp_CXXFLAGS := -xO2
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
      # Temporary util SS12u1 C++ compiler is fixed
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
      BUILD_LIBJVM_c1_LinearScan.cpp_CXXFLAGS := -xO2
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
    endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
  # Need extra inlining to get oop_ps_push_contents functions to perform well enough.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
  ifeq ($(DEBUG_LEVEL),release)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
    BUILD_LIBJVM_psPromotionManager.cpp_CXXFLAGS := -W2,-Ainline:inc=1000
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
  ifeq ($(DEBUG_LEVEL), fastdebug)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
    # this hangs in iropt now (7113504)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
    BUILD_LIBJVM_compileBroker.cpp_CXXFLAGS := -xO2
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
    # Frame size > 100k  if we allow inlining via -g0!
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
    BUILD_LIBJVM_bytecodeInterpreter.cpp_CXXFLAGS := +d
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
    BUILD_LIBJVM_bytecodeInterpreterWithChecks.cpp_CXXFLAGS := +d
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
   121
    ifeq ($(call isTargetCpuArch, x86), true)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
      # ube explodes on x86
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
      BUILD_LIBJVM_bytecodeInterpreter.cpp_CXXFLAGS += -xO1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   124
      BUILD_LIBJVM_bytecodeInterpreterWithChecks.cpp_CXXFLAGS += -xO1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
    endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   126
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
49370
81bc1dc36a53 8197235: src/hotspot/share/jvmci/jvmciCompilerToVM.cpp takes 4 minutes to compile on windows
kvn
parents: 48838
diff changeset
   129
  # Workaround for jvmciCompilerToVM.cpp long compilation time
81bc1dc36a53 8197235: src/hotspot/share/jvmci/jvmciCompilerToVM.cpp takes 4 minutes to compile on windows
kvn
parents: 48838
diff changeset
   130
  BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_OPTIMIZATION := NONE
81bc1dc36a53 8197235: src/hotspot/share/jvmci/jvmciCompilerToVM.cpp takes 4 minutes to compile on windows
kvn
parents: 48838
diff changeset
   131
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
   132
else ifeq ($(call isTargetOs, macosx), true)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   133
  # The copied fdlibm routines in these files must not be optimized
51782
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
   134
  BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
a50956e2368c 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
sgehwolf
parents: 51738
diff changeset
   135
  BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   136
  ifeq ($(TOOLCHAIN_TYPE), clang)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   137
    # NOTE: The old build tested clang version to make sure this workaround
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   138
    # for the clang bug was still needed.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   139
    BUILD_LIBJVM_loopTransform.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   140
    ifneq ($(DEBUG_LEVEL), slowdebug)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   141
      BUILD_LIBJVM_unsafe.cpp_CXXFLAGS := -O1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   142
    endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   143
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   144
    # The following files are compiled at various optimization
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   145
    # levels due to optimization issues encountered at the
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
    # default level. The Clang compiler issues a compile
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
    # time error if there is an optimization level specification
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
    # skew between the PCH file and the C++ file.  Especially if the
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   149
    # PCH file is compiled at a higher optimization level than
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   150
    # the C++ file.  One solution might be to prepare extra optimization
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   151
    # level specific PCH files for the opt build and use them here, but
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   152
    # it's probably not worth the effort as long as only a few files
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   153
    # need this special handling.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   154
    JVM_PRECOMPILED_HEADER_EXCLUDE := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   155
        sharedRuntimeTrig.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   156
        sharedRuntimeTrans.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   157
        loopTransform.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   158
        unsafe.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   159
        jvmciCompilerToVM.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   160
        #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   161
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   162
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
   163
else ifeq ($(call isTargetOs, aix), true)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   164
  BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -qnoinline
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   165
  BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   166
  # Disable aggressive optimizations for functions in sharedRuntimeTrig.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   167
  # and sharedRuntimeTrans.cpp on ppc64.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   168
  # -qstrict turns off the following optimizations:
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   169
  #   * Performing code motion and scheduling on computations such as loads
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   170
  #     and floating-point computations that may trigger an exception.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   171
  #   * Relaxing conformance to IEEE rules.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   172
  #   * Reassociating floating-point expressions.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   173
  # When using '-qstrict' there still remains one problem
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   174
  # in javasoft.sqe.tests.api.java.lang.Math.sin5Tests when run in compile-all
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   175
  # mode, so don't optimize sharedRuntimeTrig.cpp at all.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   176
  BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   177
39214
294cc054a0b4 8158938: AIX: some more new hotspot build fixes
simonis
parents: 38097
diff changeset
   178
  ifneq ($(DEBUG_LEVEL),slowdebug)
294cc054a0b4 8158938: AIX: some more new hotspot build fixes
simonis
parents: 38097
diff changeset
   179
    # Compiling jvmtiEnterTrace.cpp with full optimization needs more than 30min
294cc054a0b4 8158938: AIX: some more new hotspot build fixes
simonis
parents: 38097
diff changeset
   180
    # (mostly because of '-qhot=level=1' and the more than 1300 'log_trace' calls
294cc054a0b4 8158938: AIX: some more new hotspot build fixes
simonis
parents: 38097
diff changeset
   181
    # which cause a lot of template expansion).
294cc054a0b4 8158938: AIX: some more new hotspot build fixes
simonis
parents: 38097
diff changeset
   182
    BUILD_LIBJVM_jvmtiEnterTrace.cpp_OPTIMIZATION := LOW
294cc054a0b4 8158938: AIX: some more new hotspot build fixes
simonis
parents: 38097
diff changeset
   183
  endif
294cc054a0b4 8158938: AIX: some more new hotspot build fixes
simonis
parents: 38097
diff changeset
   184
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   185
  # Disable ELF decoder on AIX (AIX uses XCOFF).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   186
  JVM_EXCLUDE_PATTERNS += elf
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   187
53683
48ff68e2fe5c 8218431: Improved platform checking in makefiles
ihse
parents: 52925
diff changeset
   188
else ifeq ($(call isTargetOs, windows), true)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   189
  JVM_PRECOMPILED_HEADER_EXCLUDE := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   190
      bytecodeInterpreter.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   191
      bytecodeInterpreterWithChecks.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   192
      opcodes.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   193
      os_windows.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   194
      os_windows_x86.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   195
      osThread_windows.cpp \
49370
81bc1dc36a53 8197235: src/hotspot/share/jvmci/jvmciCompilerToVM.cpp takes 4 minutes to compile on windows
kvn
parents: 48838
diff changeset
   196
      jvmciCompilerToVMInit.cpp \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   197
      #
49370
81bc1dc36a53 8197235: src/hotspot/share/jvmci/jvmciCompilerToVM.cpp takes 4 minutes to compile on windows
kvn
parents: 48838
diff changeset
   198
81bc1dc36a53 8197235: src/hotspot/share/jvmci/jvmciCompilerToVM.cpp takes 4 minutes to compile on windows
kvn
parents: 48838
diff changeset
   199
  # Workaround for jvmciCompilerToVM.cpp long compilation time
81bc1dc36a53 8197235: src/hotspot/share/jvmci/jvmciCompilerToVM.cpp takes 4 minutes to compile on windows
kvn
parents: 48838
diff changeset
   200
  BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_OPTIMIZATION := NONE
81bc1dc36a53 8197235: src/hotspot/share/jvmci/jvmciCompilerToVM.cpp takes 4 minutes to compile on windows
kvn
parents: 48838
diff changeset
   201
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   202
endif