Tue, 11 Nov 2008 22:01:08 -0800
6764892: VS2008 changes required to compile hotspot sources
Summary: Minor changes required to build using the Visual Studio 2008 compiler
Reviewed-by: kvn, ohair
duke@435 | 1 | # |
xdono@631 | 2 | # Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. |
duke@435 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | # |
duke@435 | 5 | # This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | # under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | # published by the Free Software Foundation. |
duke@435 | 8 | # |
duke@435 | 9 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | # accompanied this code). |
duke@435 | 14 | # |
duke@435 | 15 | # You should have received a copy of the GNU General Public License version |
duke@435 | 16 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | # |
duke@435 | 19 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
duke@435 | 20 | # CA 95054 USA or visit www.sun.com if you need additional information or |
duke@435 | 21 | # have any questions. |
duke@435 | 22 | # |
duke@435 | 23 | # |
duke@435 | 24 | |
kamg@526 | 25 | !include $(WorkSpace)/make/windows/makefiles/compile.make |
duke@435 | 26 | |
duke@435 | 27 | # Rules for building adlc.exe |
duke@435 | 28 | |
duke@435 | 29 | # Need exception handling support here |
duke@435 | 30 | # $(MS_RUNTIME_OPTION) ( with /D_STATIC_CPPLIB) |
duke@435 | 31 | # causes adlc.exe to link with the static |
duke@435 | 32 | # multithread Standard C++ library (libcpmt.lib) instead of |
duke@435 | 33 | # the dynamic version (msvcprt.lib), which is not included |
duke@435 | 34 | # in any of the free tools. |
duke@435 | 35 | EXH_FLAGS=$(GX_OPTION) $(MS_RUNTIME_OPTION) |
duke@435 | 36 | |
duke@435 | 37 | !ifdef ALT_ADLC_PATH |
duke@435 | 38 | ADLC=$(ALT_ADLC_PATH)\adlc.exe |
duke@435 | 39 | !else |
duke@435 | 40 | ADLC=adlc |
duke@435 | 41 | !endif |
duke@435 | 42 | |
duke@435 | 43 | !ifdef LP64 |
duke@435 | 44 | ADLCFLAGS=-q -T -D_LP64 |
duke@435 | 45 | !else |
duke@435 | 46 | ADLCFLAGS=-q -T -U_LP64 |
duke@435 | 47 | !endif |
duke@435 | 48 | |
duke@435 | 49 | |
duke@435 | 50 | CPP_INCLUDE_DIRS=\ |
duke@435 | 51 | /I "..\generated" \ |
duke@435 | 52 | /I "$(WorkSpace)\src\share\vm\compiler" \ |
duke@435 | 53 | /I "$(WorkSpace)\src\share\vm\code" \ |
duke@435 | 54 | /I "$(WorkSpace)\src\share\vm\interpreter" \ |
duke@435 | 55 | /I "$(WorkSpace)\src\share\vm\classfile" \ |
duke@435 | 56 | /I "$(WorkSpace)\src\share\vm\asm" \ |
duke@435 | 57 | /I "$(WorkSpace)\src\share\vm\memory" \ |
duke@435 | 58 | /I "$(WorkSpace)\src\share\vm\oops" \ |
duke@435 | 59 | /I "$(WorkSpace)\src\share\vm\prims" \ |
duke@435 | 60 | /I "$(WorkSpace)\src\share\vm\runtime" \ |
duke@435 | 61 | /I "$(WorkSpace)\src\share\vm\utilities" \ |
duke@435 | 62 | /I "$(WorkSpace)\src\share\vm\libadt" \ |
duke@435 | 63 | /I "$(WorkSpace)\src\share\vm\opto" \ |
duke@435 | 64 | /I "$(WorkSpace)\src\os\windows\vm" \ |
duke@435 | 65 | /I "$(WorkSpace)\src\cpu\$(Platform_arch)\vm" |
duke@435 | 66 | |
duke@435 | 67 | # NOTE! If you add any files here, you must also update GENERATED_NAMES_IN_INCL |
duke@435 | 68 | # and MakeDepsIDEOptions in makedeps.make. |
duke@435 | 69 | GENERATED_NAMES=\ |
duke@435 | 70 | ad_$(Platform_arch_model).cpp \ |
duke@435 | 71 | ad_$(Platform_arch_model).hpp \ |
duke@435 | 72 | ad_$(Platform_arch_model)_clone.cpp \ |
duke@435 | 73 | ad_$(Platform_arch_model)_expand.cpp \ |
duke@435 | 74 | ad_$(Platform_arch_model)_format.cpp \ |
duke@435 | 75 | ad_$(Platform_arch_model)_gen.cpp \ |
duke@435 | 76 | ad_$(Platform_arch_model)_misc.cpp \ |
duke@435 | 77 | ad_$(Platform_arch_model)_peephole.cpp \ |
duke@435 | 78 | ad_$(Platform_arch_model)_pipeline.cpp \ |
duke@435 | 79 | adGlobals_$(Platform_arch_model).hpp \ |
duke@435 | 80 | dfa_$(Platform_arch_model).cpp |
duke@435 | 81 | |
duke@435 | 82 | # NOTE! This must be kept in sync with GENERATED_NAMES |
duke@435 | 83 | GENERATED_NAMES_IN_INCL=\ |
duke@435 | 84 | incls/ad_$(Platform_arch_model).cpp \ |
duke@435 | 85 | incls/ad_$(Platform_arch_model).hpp \ |
duke@435 | 86 | incls/ad_$(Platform_arch_model)_clone.cpp \ |
duke@435 | 87 | incls/ad_$(Platform_arch_model)_expand.cpp \ |
duke@435 | 88 | incls/ad_$(Platform_arch_model)_format.cpp \ |
duke@435 | 89 | incls/ad_$(Platform_arch_model)_gen.cpp \ |
duke@435 | 90 | incls/ad_$(Platform_arch_model)_misc.cpp \ |
duke@435 | 91 | incls/ad_$(Platform_arch_model)_peephole.cpp \ |
duke@435 | 92 | incls/ad_$(Platform_arch_model)_pipeline.cpp \ |
duke@435 | 93 | incls/adGlobals_$(Platform_arch_model).hpp \ |
duke@435 | 94 | incls/dfa_$(Platform_arch_model).cpp |
duke@435 | 95 | |
duke@435 | 96 | {$(WorkSpace)\src\share\vm\adlc}.cpp.obj:: |
duke@435 | 97 | $(CPP) $(CPP_FLAGS) $(EXH_FLAGS) $(CPP_INCLUDE_DIRS) /c $< |
duke@435 | 98 | |
duke@435 | 99 | {$(WorkSpace)\src\share\vm\opto}.cpp.obj:: |
duke@435 | 100 | $(CPP) $(CPP_FLAGS) $(EXH_FLAGS) $(CPP_INCLUDE_DIRS) /c $< |
duke@435 | 101 | |
duke@435 | 102 | adlc.exe: main.obj adlparse.obj archDesc.obj arena.obj dfa.obj dict2.obj filebuff.obj \ |
duke@435 | 103 | forms.obj formsopt.obj formssel.obj opcodes.obj output_c.obj output_h.obj |
duke@435 | 104 | $(LINK) $(LINK_FLAGS) /subsystem:console /out:$@ $** |
tbell@862 | 105 | !if "$(MT)" != "" |
tbell@862 | 106 | # The previous link command created a .manifest file that we want to |
tbell@862 | 107 | # insert into the linked artifact so we do not need to track it |
tbell@862 | 108 | # separately. Use ";#2" for .dll and ";#1" for .exe: |
tbell@862 | 109 | $(MT) /manifest $@.manifest /outputresource:$@;#1 |
tbell@862 | 110 | !endif |
duke@435 | 111 | |
duke@435 | 112 | $(GENERATED_NAMES_IN_INCL): $(Platform_arch_model).ad adlc.exe includeDB.current |
duke@435 | 113 | rm -f $(GENERATED_NAMES) |
duke@435 | 114 | $(ADLC) $(ADLCFLAGS) $(Platform_arch_model).ad |
duke@435 | 115 | mv $(GENERATED_NAMES) incls/ |
duke@435 | 116 | |
duke@435 | 117 | $(Platform_arch_model).ad: $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad |
duke@435 | 118 | rm -f $(Platform_arch_model).ad |
duke@435 | 119 | cat $(WorkSpace)/src/cpu/$(Platform_arch)/vm/$(Platform_arch_model).ad \ |
duke@435 | 120 | $(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm/windows_$(Platform_arch_model).ad >$(Platform_arch_model).ad |