make/windows/makefiles/adlc.make

Tue, 08 Aug 2017 15:57:29 +0800

author
aoqi
date
Tue, 08 Aug 2017 15:57:29 +0800
changeset 6876
710a3c8b516e
parent 6198
55fb97c4c58d
parent 0
f90c822e73f8
permissions
-rw-r--r--

merge

aoqi@0 1 #
aoqi@0 2 # Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 #
aoqi@0 5 # This code is free software; you can redistribute it and/or modify it
aoqi@0 6 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 # published by the Free Software Foundation.
aoqi@0 8 #
aoqi@0 9 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 12 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 13 # accompanied this code).
aoqi@0 14 #
aoqi@0 15 # You should have received a copy of the GNU General Public License version
aoqi@0 16 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 18 #
aoqi@0 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 20 # or visit www.oracle.com if you need additional information or have any
aoqi@0 21 # questions.
aoqi@0 22 #
aoqi@0 23 #
aoqi@0 24
aoqi@0 25
aoqi@0 26 # Rules for building adlc.exe
aoqi@0 27
aoqi@0 28 # Need exception handling support here
aoqi@0 29 # $(MS_RUNTIME_OPTION) ( with /D_STATIC_CPPLIB)
aoqi@0 30 # causes adlc.exe to link with the static
aoqi@0 31 # multithread Standard C++ library (libcpmt.lib) instead of
aoqi@0 32 # the dynamic version (msvcprt.lib), which is not included
aoqi@0 33 # in any of the free tools.
aoqi@0 34 EXH_FLAGS=$(GX_OPTION) $(MS_RUNTIME_OPTION)
aoqi@0 35
aoqi@0 36 !ifdef ALT_ADLC_PATH
aoqi@0 37 ADLC=$(ALT_ADLC_PATH)\adlc.exe
aoqi@0 38 !else
aoqi@0 39 ADLC=adlc
aoqi@0 40 !endif
aoqi@0 41
aoqi@0 42 !ifdef LP64
aoqi@0 43 ADLCFLAGS=-q -T -D_LP64
aoqi@0 44 !else
aoqi@0 45 ADLCFLAGS=-q -T -U_LP64
aoqi@0 46 !endif
aoqi@0 47
aoqi@0 48 ADLC_CXX_FLAGS=$(CXX_FLAGS) /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
aoqi@0 49
aoqi@0 50 CXX_INCLUDE_DIRS=\
aoqi@0 51 /I "..\generated" \
aoqi@0 52 /I "$(WorkSpace)\src\share\vm" \
aoqi@0 53 /I "$(WorkSpace)\src\os\windows\vm" \
aoqi@0 54 /I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm"
aoqi@0 55
aoqi@0 56 !if "$(Platform_arch_model)" == "$(Platform_arch)"
aoqi@0 57 SOURCES_AD=\
aoqi@0 58 $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad
aoqi@0 59 !else
aoqi@0 60 SOURCES_AD=\
aoqi@0 61 $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \
aoqi@0 62 $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch).ad
aoqi@0 63 !endif
aoqi@0 64
aoqi@0 65 # NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_DIR
aoqi@0 66 # and ProjectCreatorIDEOptions in projectcreator.make.
aoqi@0 67 GENERATED_NAMES=\
aoqi@0 68 ad_$(Platform_arch_model).cpp \
aoqi@0 69 ad_$(Platform_arch_model).hpp \
aoqi@0 70 ad_$(Platform_arch_model)_clone.cpp \
aoqi@0 71 ad_$(Platform_arch_model)_expand.cpp \
aoqi@0 72 ad_$(Platform_arch_model)_format.cpp \
aoqi@0 73 ad_$(Platform_arch_model)_gen.cpp \
aoqi@0 74 ad_$(Platform_arch_model)_misc.cpp \
aoqi@0 75 ad_$(Platform_arch_model)_peephole.cpp \
aoqi@0 76 ad_$(Platform_arch_model)_pipeline.cpp \
aoqi@0 77 adGlobals_$(Platform_arch_model).hpp \
aoqi@0 78 dfa_$(Platform_arch_model).cpp
aoqi@0 79
aoqi@0 80 # NOTE! This must be kept in sync with GENERATED_NAMES
aoqi@0 81 GENERATED_NAMES_IN_DIR=\
aoqi@0 82 $(AdlcOutDir)\ad_$(Platform_arch_model).cpp \
aoqi@0 83 $(AdlcOutDir)\ad_$(Platform_arch_model).hpp \
aoqi@0 84 $(AdlcOutDir)\ad_$(Platform_arch_model)_clone.cpp \
aoqi@0 85 $(AdlcOutDir)\ad_$(Platform_arch_model)_expand.cpp \
aoqi@0 86 $(AdlcOutDir)\ad_$(Platform_arch_model)_format.cpp \
aoqi@0 87 $(AdlcOutDir)\ad_$(Platform_arch_model)_gen.cpp \
aoqi@0 88 $(AdlcOutDir)\ad_$(Platform_arch_model)_misc.cpp \
aoqi@0 89 $(AdlcOutDir)\ad_$(Platform_arch_model)_peephole.cpp \
aoqi@0 90 $(AdlcOutDir)\ad_$(Platform_arch_model)_pipeline.cpp \
aoqi@0 91 $(AdlcOutDir)\adGlobals_$(Platform_arch_model).hpp \
aoqi@0 92 $(AdlcOutDir)\dfa_$(Platform_arch_model).cpp
aoqi@0 93
aoqi@0 94 {$(WorkSpace)\src\share\vm\adlc}.cpp.obj::
aoqi@0 95 $(CXX) $(ADLC_CXX_FLAGS) $(EXH_FLAGS) $(CXX_INCLUDE_DIRS) /c $<
aoqi@0 96
aoqi@0 97 {$(WorkSpace)\src\share\vm\opto}.cpp.obj::
aoqi@0 98 $(CXX) $(ADLC_CXX_FLAGS) $(EXH_FLAGS) $(CXX_INCLUDE_DIRS) /c $<
aoqi@0 99
aoqi@0 100 adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \
aoqi@0 101 forms.obj formsopt.obj formssel.obj opcodes.obj output_c.obj output_h.obj
aoqi@0 102 $(LD) $(LD_FLAGS) /subsystem:console /out:$@ $**
aoqi@0 103 !if "$(MT)" != ""
aoqi@0 104 # The previous link command created a .manifest file that we want to
aoqi@0 105 # insert into the linked artifact so we do not need to track it
aoqi@0 106 # separately. Use ";#2" for .dll and ";#1" for .exe:
aoqi@0 107 $(MT) /manifest $@.manifest /outputresource:$@;#1
aoqi@0 108 !endif
aoqi@0 109
aoqi@0 110 $(GENERATED_NAMES_IN_DIR): $(Platform_arch_model).ad adlc.exe
aoqi@0 111 rm -f $(GENERATED_NAMES)
aoqi@0 112 if exist $(AdlcOutDir) rmdir /s /q $(AdlcOutDir)
aoqi@0 113 mkdir $(AdlcOutDir)
aoqi@0 114 $(ADLC) $(ADLCFLAGS) $(Platform_arch_model).ad
aoqi@0 115 mv $(GENERATED_NAMES) $(AdlcOutDir)/
aoqi@0 116
aoqi@0 117 $(Platform_arch_model).ad: $(SOURCES_AD)
aoqi@0 118 rm -f $(Platform_arch_model).ad
aoqi@0 119 cat $(SOURCES_AD) >$(Platform_arch_model).ad

mercurial