hotspot/make/gensrc/GensrcAdlc.gmk
author erikj
Tue, 26 Apr 2016 13:35:28 +0200
changeset 38097 1ca3d6f508b1
parent 37469 hotspot/makefiles/gensrc/GensrcAdlc.gmk@ac811846846c
child 39963 5921b7f27d63
permissions -rw-r--r--
8150601: Remove the old Hotspot build system Reviewed-by: ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     1
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     2
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
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
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    26
$(eval $(call IncludeCustomExtension, hotspot, gensrc/GensrcAdlc.gmk))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    27
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    28
ifeq ($(call check-jvm-feature, compiler2), true)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    29
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    30
  ADLC_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/adlc
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    31
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    32
  ##############################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    33
  # Build the ad compiler (the adlc build tool)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    34
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    35
  # Flags depending on the build platform/tool chain
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    36
  # NOTE: No optimization or debug flags set here
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    37
  ifeq ($(OPENJDK_BUILD_OS), linux)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    38
    ADLC_CFLAGS := -fno-exceptions -DLINUX
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    39
  else ifeq ($(OPENJDK_BUILD_OS), solaris)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    40
    ADLC_LDFLAGS := -m64
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    41
    ADLC_CFLAGS := -m64
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    42
    ADLC_CFLAGS_WARNINGS := +w
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    43
  else ifeq ($(OPENJDK_BUILD_OS), aix)
37469
ac811846846c 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents: 37437
diff changeset
    44
    ADLC_LDFLAGS := -q64
ac811846846c 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents: 37437
diff changeset
    45
    ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    46
  else ifeq ($(OPENJDK_BUILD_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    47
    ADLC_LDFLAGS := -nologo
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    48
    ADLC_CFLAGS := -nologo -EHsc
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    49
    # NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    50
    # seem needed any more.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    51
    ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    52
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    53
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    54
  # NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    55
  # hurt.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    56
  ADLC_CFLAGS += -DASSERT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    58
  ADLC_CFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    59
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    60
  ADLC_CFLAGS += -I$(HOTSPOT_TOPDIR)/src/share/vm
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    61
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    62
  $(eval $(call SetupNativeCompilation, BUILD_ADLC, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    63
      TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    64
      SRC := $(HOTSPOT_TOPDIR)/src/share/vm/adlc, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    65
      EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/share/vm/opto/opcodes.cpp, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
      CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
      LDFLAGS := $(ADLC_LDFLAGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
      LIBS := $(ADLC_LIBS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
      OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    70
      OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    71
      PROGRAM := adlc, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
      DEBUG_SYMBOLS := false, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
      DISABLED_WARNINGS_clang := parentheses tautological-compare, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
      DISABLED_WARNINGS_solstudio := notemsource, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
  ADLC_TOOL := $(BUILD_ADLC_TARGET)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
  ##############################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
  # Transform the ad source files into C++ source files using adlc
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
  # Setup flags for the adlc build tool (ADLCFLAGS).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
  ADLCFLAGS += -q -T
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
  # ADLC flags depending on target OS
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
  ifeq ($(OPENJDK_TARGET_OS), linux)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
    ADLCFLAGS += -DLINUX=1 -D_GNU_SOURCE=1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
  else ifeq ($(OPENJDK_TARGET_OS), solaris)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    89
    ADLCFLAGS += -DSOLARIS=1 -DSPARC_WORKS=1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
  else ifeq ($(OPENJDK_TARGET_OS), aix)
37469
ac811846846c 8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents: 37437
diff changeset
    91
    ADLCFLAGS += -DAIX=1
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
  else ifeq ($(OPENJDK_TARGET_OS), macosx)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
    ADLCFLAGS += -D_ALLBSD_SOURCE=1 -D_GNU_SOURCE=1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
  ifneq ($(OPENJDK_TARGET_OS), windows)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
    # NOTE: Windows adlc flags was different in the old build. Is this really
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
    # correct?
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
    # -g makes #line directives in the generated C++ files.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
    ADLCFLAGS += -g
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
    ADLCFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)=1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
  # This generates checks in the generated C++ files that _LP64 is correctly
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
  # (un)defined when compiling them.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
    ADLCFLAGS += -D_LP64=1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
  else
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
    ADLCFLAGS += -U_LP64
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
  endif
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
  ##############################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
  # Concatenate all ad source files into a single file, which will be fed to
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
  # adlc. Also include a #line directive at the start of every included file
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
  # (after the initial header block), stating the original source file name.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
  #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
  # Normally, debugging is done directly on the ad_<arch>*.cpp files, but the
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
  # #line directives in those files will be pointing back to <arch>.ad.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
  # AD_SRC_ROOTS might have been added to by a custom extension
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
  AD_SRC_ROOTS += $(HOTSPOT_TOPDIR)/src
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   124
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
  AD_SRC_FILES := $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   126
      $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm/$(HOTSPOT_TARGET_CPU).ad \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
      $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm/$(HOTSPOT_TARGET_CPU_ARCH).ad \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
      $d/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH)/vm/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH).ad \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
    )))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   130
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
  SINGLE_AD_SRCFILE := $(ADLC_SUPPORT_DIR)/all-ad-src.ad
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   132
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   133
  INSERT_FILENAME_AWK_SCRIPT := \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   134
      '{ \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   135
         if (CUR_FN != FILENAME) { CUR_FN=FILENAME; NR_BASE=NR-1; need_lineno=1 } \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   136
         if (need_lineno && $$0 !~ /\/\//) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   137
           { print "\n\n\#line " (NR-NR_BASE) " \"" FILENAME "\""; need_lineno=0 }; \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   138
         print \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   139
       }'
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   140
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   141
  $(SINGLE_AD_SRCFILE): $(AD_SRC_FILES)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   142
	$(call LogInfo, Preprocessing adlc files $(^F))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   143
	$(call MakeDir, $(@D))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   144
	$(NAWK) $(INSERT_FILENAME_AWK_SCRIPT) $^ > $@
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   145
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
  ##############################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
  # Run the adlc tool on the single concatenated ad source file, and store the
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
  # output in support/adlc for further processing.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   149
  ADLC_RUN_MARKER := $(ADLC_SUPPORT_DIR)/_adlc_run.marker
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   150
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   151
  $(ADLC_RUN_MARKER): $(BUILD_ADLC) $(SINGLE_AD_SRCFILE)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   152
	$(call LogInfo, Generating adlc files)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   153
	$(call MakeDir, $(@D))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   154
	$(call ExecuteWithLog, $(ADLC_SUPPORT_DIR)/adlc_run, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   155
	    $(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   156
	        -c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU).cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   157
	        -h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU).hpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   158
	        -a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU).cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   159
	        -v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU).hpp)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   160
	$(TOUCH) $@
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   161
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   162
  ##############################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   163
  # Finally copy the generated files from support/adlc into gensrc/adfiles,
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   164
  # and postprocess them by fixing dummy #line directives.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   165
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   166
  ADLC_GENERATED_FILES := $(addprefix $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   167
      ad_$(HOTSPOT_TARGET_CPU).cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   168
      ad_$(HOTSPOT_TARGET_CPU).hpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   169
      ad_$(HOTSPOT_TARGET_CPU)_clone.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   170
      ad_$(HOTSPOT_TARGET_CPU)_expand.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   171
      ad_$(HOTSPOT_TARGET_CPU)_format.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   172
      ad_$(HOTSPOT_TARGET_CPU)_gen.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   173
      ad_$(HOTSPOT_TARGET_CPU)_misc.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   174
      ad_$(HOTSPOT_TARGET_CPU)_peephole.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   175
      ad_$(HOTSPOT_TARGET_CPU)_pipeline.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   176
      adGlobals_$(HOTSPOT_TARGET_CPU).hpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   177
      dfa_$(HOTSPOT_TARGET_CPU).cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   178
  )
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   179
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   180
  $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(ADLC_RUN_MARKER)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   181
	$(call LogInfo, Postprocessing adlc file $*)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   182
	$(call MakeDir, $(@D))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   183
	$(NAWK) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   184
	    'BEGIN { print "#line 1 \"$*\""; } \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   185
	     /^#line 999999$$/ {print "#line " (NR+1) " \"$*\""; next} \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   186
	     {print}' \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   187
	    < $(ADLC_SUPPORT_DIR)/$* > $@
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   188
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   189
  TARGETS := $(ADLC_GENERATED_FILES)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   190
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   191
endif