hotspot/make/windows/makefiles/adlc.make
author erikj
Mon, 06 Feb 2012 09:14:22 +0100
changeset 11721 dcd1f62c9caf
parent 11429 e894217a5d94
child 13963 e5b53c306fb5
permissions -rw-r--r--
7141242: build-infra merge: Rename CPP->CXX and LINK->LD Summary: Cleaned up make variables for compilers and linker to consistently use CXX for C++ compiler, CC for C compiler and LD for linker. Reviewed-by: dholmes, ohrstrom
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
#
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
     2
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
# accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
#
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3261
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3261
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3261
diff changeset
    21
# questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
#  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
# Rules for building adlc.exe
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
# Need exception handling support here
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
# $(MS_RUNTIME_OPTION) ( with /D_STATIC_CPPLIB)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
# causes adlc.exe to link with the static
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
# multithread Standard C++ library (libcpmt.lib) instead of
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
# the dynamic version (msvcprt.lib), which is not included
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
# in any of the free tools.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
EXH_FLAGS=$(GX_OPTION) $(MS_RUNTIME_OPTION)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
!ifdef ALT_ADLC_PATH
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
ADLC=$(ALT_ADLC_PATH)\adlc.exe
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
!else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
ADLC=adlc
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
!endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
!ifdef LP64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
ADLCFLAGS=-q -T -D_LP64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
!else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
ADLCFLAGS=-q -T -U_LP64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
!endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 11429
diff changeset
    48
ADLC_CXX_FLAGS=$(CXX_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 11429
diff changeset
    50
CXX_INCLUDE_DIRS=\
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    51
  /I "..\generated" \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    52
  /I "$(WorkSpace)\src\share\vm" \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    53
  /I "$(WorkSpace)\src\os\windows\vm" \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  /I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
11429
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    56
!if "$(Platform_arch_model)" == "$(Platform_arch)"
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    57
SOURCES_AD=\
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    58
  $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    59
  $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    60
!else
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    61
SOURCES_AD=\
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    62
  $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    63
  $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch).ad \
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    64
  $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    65
!endif
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
    66
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    67
# NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_DIR
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    68
# and ProjectCreatorIDEOptions in projectcreator.make. 
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
GENERATED_NAMES=\
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  ad_$(Platform_arch_model).cpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  ad_$(Platform_arch_model).hpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  ad_$(Platform_arch_model)_clone.cpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  ad_$(Platform_arch_model)_expand.cpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  ad_$(Platform_arch_model)_format.cpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  ad_$(Platform_arch_model)_gen.cpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  ad_$(Platform_arch_model)_misc.cpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  ad_$(Platform_arch_model)_peephole.cpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  ad_$(Platform_arch_model)_pipeline.cpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
  adGlobals_$(Platform_arch_model).hpp \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  dfa_$(Platform_arch_model).cpp
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
# NOTE! This must be kept in sync with GENERATED_NAMES
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    83
GENERATED_NAMES_IN_DIR=\
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    84
  $(AdlcOutDir)\ad_$(Platform_arch_model).cpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    85
  $(AdlcOutDir)\ad_$(Platform_arch_model).hpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    86
  $(AdlcOutDir)\ad_$(Platform_arch_model)_clone.cpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    87
  $(AdlcOutDir)\ad_$(Platform_arch_model)_expand.cpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    88
  $(AdlcOutDir)\ad_$(Platform_arch_model)_format.cpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    89
  $(AdlcOutDir)\ad_$(Platform_arch_model)_gen.cpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    90
  $(AdlcOutDir)\ad_$(Platform_arch_model)_misc.cpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    91
  $(AdlcOutDir)\ad_$(Platform_arch_model)_peephole.cpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    92
  $(AdlcOutDir)\ad_$(Platform_arch_model)_pipeline.cpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    93
  $(AdlcOutDir)\adGlobals_$(Platform_arch_model).hpp \
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    94
  $(AdlcOutDir)\dfa_$(Platform_arch_model).cpp
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
{$(WorkSpace)\src\share\vm\adlc}.cpp.obj::
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 11429
diff changeset
    97
        $(CXX) $(ADLC_CXX_FLAGS) $(EXH_FLAGS) $(CXX_INCLUDE_DIRS) /c $<
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
{$(WorkSpace)\src\share\vm\opto}.cpp.obj::
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 11429
diff changeset
   100
        $(CXX) $(ADLC_CXX_FLAGS) $(EXH_FLAGS) $(CXX_INCLUDE_DIRS) /c $<
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
          forms.obj formsopt.obj formssel.obj opcodes.obj output_c.obj output_h.obj
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 11429
diff changeset
   104
	$(LD) $(LD_FLAGS) /subsystem:console /out:$@ $**
1546
a02228c60567 6764892: VS2008 changes required to compile hotspot sources
tbell
parents: 670
diff changeset
   105
!if "$(MT)" != ""
a02228c60567 6764892: VS2008 changes required to compile hotspot sources
tbell
parents: 670
diff changeset
   106
# The previous link command created a .manifest file that we want to
a02228c60567 6764892: VS2008 changes required to compile hotspot sources
tbell
parents: 670
diff changeset
   107
# insert into the linked artifact so we do not need to track it
a02228c60567 6764892: VS2008 changes required to compile hotspot sources
tbell
parents: 670
diff changeset
   108
# separately.  Use ";#2" for .dll and ";#1" for .exe:
a02228c60567 6764892: VS2008 changes required to compile hotspot sources
tbell
parents: 670
diff changeset
   109
	$(MT) /manifest $@.manifest /outputresource:$@;#1
a02228c60567 6764892: VS2008 changes required to compile hotspot sources
tbell
parents: 670
diff changeset
   110
!endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   112
$(GENERATED_NAMES_IN_DIR): $(Platform_arch_model).ad adlc.exe
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
	rm -f $(GENERATED_NAMES)
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   114
	if exist $(AdlcOutDir) rmdir /s /q $(AdlcOutDir)
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   115
	mkdir $(AdlcOutDir)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
	$(ADLC) $(ADLCFLAGS) $(Platform_arch_model).ad
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   117
	mv $(GENERATED_NAMES) $(AdlcOutDir)/
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
11429
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
   119
$(Platform_arch_model).ad: $(SOURCES_AD)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
	rm -f $(Platform_arch_model).ad
11429
e894217a5d94 7121648: Use 3-operands SIMD instructions on x86 with AVX
kvn
parents: 7452
diff changeset
   121
	cat $(SOURCES_AD) >$(Platform_arch_model).ad