Thu, 08 Aug 2013 09:21:30 -0700
8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
Summary: ProjectCreator tool is modified to support two new options: '-relativeAltSrcInclude' and '-altRelativeInclude' which prevents IDE linker errors. Also fixed some cmd line build linker warnings. Misc cleanups.
Reviewed-by: rdurbin, coleenp
duke@435 | 1 | # |
zgu@4492 | 2 | # Copyright (c) 1999, 2013, Oracle and/or its affiliates. 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 | # |
trims@1907 | 19 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | # or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | # questions. |
sla@5237 | 22 | # |
duke@435 | 23 | # |
duke@435 | 24 | |
kamg@526 | 25 | !include $(WorkSpace)/make/windows/makefiles/rules.make |
duke@435 | 26 | |
duke@435 | 27 | # This is used externally by both batch and IDE builds, so can't |
duke@435 | 28 | # reference any of the HOTSPOTWORKSPACE, HOTSPOTBUILDSPACE, |
duke@435 | 29 | # HOTSPOTRELEASEBINDEST, or HOTSPOTDEBUGBINDEST environment variables. |
duke@435 | 30 | |
stefank@2314 | 31 | ProjectCreatorSources=\ |
stefank@2314 | 32 | $(WorkSpace)\src\share\tools\ProjectCreator\ProjectCreator.java \ |
neliasso@4112 | 33 | $(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreator.java \ |
neliasso@4112 | 34 | $(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreatorVC7.java \ |
neliasso@4112 | 35 | $(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreatorVC10.java \ |
stefank@2314 | 36 | $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatform.java \ |
stefank@2314 | 37 | $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC7.java \ |
stefank@2314 | 38 | $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC8.java \ |
stefank@2314 | 39 | $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC9.java \ |
sla@2675 | 40 | $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC10.java \ |
stefank@2314 | 41 | $(WorkSpace)\src\share\tools\ProjectCreator\Util.java \ |
stefank@2314 | 42 | $(WorkSpace)\src\share\tools\ProjectCreator\BuildConfig.java \ |
stefank@2314 | 43 | $(WorkSpace)\src\share\tools\ProjectCreator\ArgsParser.java |
duke@435 | 44 | |
duke@435 | 45 | # This is only used internally |
stefank@2314 | 46 | ProjectCreatorIncludesPRIVATE=\ |
dcubed@5500 | 47 | -relativeAltSrcInclude src\closed \ |
dcubed@5500 | 48 | -altRelativeInclude share\vm \ |
dcubed@5500 | 49 | -altRelativeInclude os\windows\vm \ |
dcubed@5500 | 50 | -altRelativeInclude os_cpu\windows_$(Platform_arch)\vm \ |
dcubed@5500 | 51 | -altRelativeInclude cpu\$(Platform_arch)\vm \ |
stefank@2314 | 52 | -relativeInclude src\share\vm \ |
brutisso@3283 | 53 | -relativeInclude src\share\vm\precompiled \ |
nloodin@3681 | 54 | -relativeInclude src\share\vm\prims\wbtestmethods \ |
duke@435 | 55 | -relativeInclude src\share\vm\prims \ |
duke@435 | 56 | -relativeInclude src\os\windows\vm \ |
duke@435 | 57 | -relativeInclude src\os_cpu\windows_$(Platform_arch)\vm \ |
stefank@2314 | 58 | -relativeInclude src\cpu\$(Platform_arch)\vm \ |
stefank@2314 | 59 | -absoluteInclude $(HOTSPOTBUILDSPACE)/%f/generated \ |
neliasso@4112 | 60 | -relativeSrcInclude src \ |
neliasso@4112 | 61 | -absoluteSrcInclude $(HOTSPOTBUILDSPACE) \ |
neliasso@4112 | 62 | -ignorePath $(HOTSPOTBUILDSPACE) \ |
neliasso@4112 | 63 | -ignorePath share\vm\adlc \ |
neliasso@4112 | 64 | -ignorePath share\vm\shark \ |
neliasso@4112 | 65 | -ignorePath share\tools \ |
neliasso@4112 | 66 | -ignorePath solaris \ |
neliasso@4112 | 67 | -ignorePath posix \ |
neliasso@4112 | 68 | -ignorePath sparc \ |
neliasso@4112 | 69 | -ignorePath linux \ |
neliasso@4112 | 70 | -ignorePath bsd \ |
neliasso@4112 | 71 | -ignorePath osx \ |
neliasso@4112 | 72 | -ignorePath arm \ |
neliasso@4112 | 73 | -ignorePath ppc \ |
neliasso@4112 | 74 | -ignorePath zero \ |
neliasso@4112 | 75 | -hidePath .hg |
sla@5237 | 76 | |
duke@435 | 77 | |
duke@435 | 78 | # This is referenced externally by both the IDE and batch builds |
stefank@2314 | 79 | ProjectCreatorOptions= |
duke@435 | 80 | |
duke@435 | 81 | # This is used externally, but only by the IDE builds, so we can |
duke@435 | 82 | # reference environment variables which aren't defined in the batch |
duke@435 | 83 | # build process. |
duke@435 | 84 | |
stefank@2314 | 85 | ProjectCreatorIDEOptions = \ |
duke@435 | 86 | -useToGeneratePch java.cpp \ |
duke@435 | 87 | -disablePch os_windows.cpp \ |
duke@435 | 88 | -disablePch os_windows_$(Platform_arch).cpp \ |
duke@435 | 89 | -disablePch osThread_windows.cpp \ |
duke@435 | 90 | -disablePch bytecodeInterpreter.cpp \ |
duke@435 | 91 | -disablePch bytecodeInterpreterWithChecks.cpp \ |
stefank@2314 | 92 | -disablePch getThread_windows_$(Platform_arch).cpp \ |
sla@5237 | 93 | -disablePch_compiler2 opcodes.cpp |
duke@435 | 94 | |
dcubed@5500 | 95 | # Common options for the IDE builds for c1, and c2 |
stefank@2314 | 96 | ProjectCreatorIDEOptions=\ |
stefank@2314 | 97 | $(ProjectCreatorIDEOptions) \ |
duke@435 | 98 | -sourceBase $(HOTSPOTWORKSPACE) \ |
stefank@2314 | 99 | -buildBase $(HOTSPOTBUILDSPACE)\%f\%b \ |
neliasso@4112 | 100 | -buildSpace $(HOTSPOTBUILDSPACE) \ |
duke@435 | 101 | -startAt src \ |
stefank@2314 | 102 | -compiler $(VcVersion) \ |
sla@2540 | 103 | -projectFileName $(HOTSPOTBUILDSPACE)\$(ProjectFile) \ |
duke@435 | 104 | -jdkTargetRoot $(HOTSPOTJDKDIST) \ |
duke@435 | 105 | -define ALIGN_STACK_FRAMES \ |
duke@435 | 106 | -define VM_LITTLE_ENDIAN \ |
erikj@3518 | 107 | -prelink "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) set JAVA_HOME=$(HOTSPOTJDKDIST) $(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(LD_VER)" \ |
stefank@2314 | 108 | -ignoreFile jsig.c \ |
stefank@2314 | 109 | -ignoreFile jvmtiEnvRecommended.cpp \ |
stefank@2314 | 110 | -ignoreFile jvmtiEnvStub.cpp \ |
stefank@2314 | 111 | -ignoreFile globalDefinitions_gcc.hpp \ |
stefank@2314 | 112 | -ignoreFile globalDefinitions_sparcWorks.hpp \ |
stefank@2314 | 113 | -ignoreFile version.rc \ |
stefank@2314 | 114 | -ignoreFile Xusage.txt \ |
stefank@2314 | 115 | -define TARGET_ARCH_x86 \ |
stefank@2314 | 116 | -define TARGET_OS_ARCH_windows_x86 \ |
stefank@2314 | 117 | -define TARGET_OS_FAMILY_windows \ |
stefank@2314 | 118 | -define TARGET_COMPILER_visCPP \ |
sla@5237 | 119 | -define INCLUDE_TRACE=1 \ |
stefank@2314 | 120 | $(ProjectCreatorIncludesPRIVATE) |
duke@435 | 121 | |
duke@435 | 122 | # Add in build-specific options |
duke@435 | 123 | !if "$(BUILDARCH)" == "i486" |
stefank@2314 | 124 | ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \ |
sla@2540 | 125 | -platformName Win32 \ |
stefank@2314 | 126 | -define IA32 \ |
stefank@2314 | 127 | -ignorePath x86_64 \ |
stefank@2314 | 128 | -define TARGET_ARCH_MODEL_x86_32 |
stefank@2314 | 129 | !else |
sla@2540 | 130 | !if "$(BUILDARCH)" == "amd64" |
stefank@2314 | 131 | ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \ |
sla@2540 | 132 | -platformName x64 \ |
sla@2540 | 133 | -define AMD64 \ |
sla@2540 | 134 | -define _LP64 \ |
stefank@2314 | 135 | -ignorePath x86_32 \ |
sla@2540 | 136 | -define TARGET_ARCH_MODEL_x86_64 \ |
sla@2540 | 137 | -define TARGET_OS_ARCH_MODEL_windows_x86_64 |
sla@2540 | 138 | !endif |
duke@435 | 139 | !endif |
duke@435 | 140 | |
stefank@2314 | 141 | ProjectCreatorIDEOptionsIgnoreCompiler1=\ |
neliasso@4112 | 142 | -ignorePath_TARGET compiler1 \ |
neliasso@4112 | 143 | -ignorePath_TARGET tiered \ |
stefank@2314 | 144 | -ignorePath_TARGET c1_ |
stefank@2314 | 145 | |
stefank@2314 | 146 | ProjectCreatorIDEOptionsIgnoreCompiler2=\ |
neliasso@4112 | 147 | -ignorePath_TARGET compiler2 \ |
neliasso@4112 | 148 | -ignorePath_TARGET tiered \ |
stefank@2314 | 149 | -ignorePath_TARGET src/share/vm/opto \ |
stefank@2314 | 150 | -ignorePath_TARGET src/share/vm/libadt \ |
stefank@2314 | 151 | -ignorePath_TARGET adfiles \ |
stefank@2314 | 152 | -ignoreFile_TARGET bcEscapeAnalyzer.cpp \ |
stefank@2314 | 153 | -ignoreFile_TARGET bcEscapeAnalyzer.hpp \ |
stefank@2314 | 154 | -ignorePath_TARGET chaitin \ |
stefank@2314 | 155 | -ignorePath_TARGET c2_ \ |
stefank@2314 | 156 | -ignorePath_TARGET runtime_ \ |
stefank@2314 | 157 | -ignoreFile_TARGET ciTypeFlow.cpp \ |
stefank@2314 | 158 | -ignoreFile_TARGET ciTypeFlow.hpp \ |
stefank@2314 | 159 | -ignoreFile_TARGET $(Platform_arch_model).ad |
stefank@2314 | 160 | |
stefank@2314 | 161 | ################################################## |
duke@435 | 162 | # Client(C1) compiler specific options |
duke@435 | 163 | ################################################## |
stefank@2314 | 164 | ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \ |
duke@435 | 165 | -define_compiler1 COMPILER1 \ |
stefank@2314 | 166 | $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=compiler1) |
duke@435 | 167 | |
duke@435 | 168 | ################################################## |
duke@435 | 169 | # Server(C2) compiler specific options |
duke@435 | 170 | ################################################## |
duke@435 | 171 | #NOTE! This list must be kept in sync with GENERATED_NAMES in adlc.make. |
stefank@2314 | 172 | ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \ |
duke@435 | 173 | -define_compiler2 COMPILER2 \ |
duke@435 | 174 | -additionalFile_compiler2 $(Platform_arch_model).ad \ |
neliasso@4112 | 175 | -additionalFile_compiler2 ad_$(Platform_arch_model).cpp \ |
neliasso@4112 | 176 | -additionalFile_compiler2 ad_$(Platform_arch_model).hpp \ |
neliasso@4112 | 177 | -additionalFile_compiler2 ad_$(Platform_arch_model)_clone.cpp \ |
neliasso@4112 | 178 | -additionalFile_compiler2 ad_$(Platform_arch_model)_expand.cpp \ |
neliasso@4112 | 179 | -additionalFile_compiler2 ad_$(Platform_arch_model)_format.cpp \ |
neliasso@4112 | 180 | -additionalFile_compiler2 ad_$(Platform_arch_model)_gen.cpp \ |
neliasso@4112 | 181 | -additionalFile_compiler2 ad_$(Platform_arch_model)_misc.cpp \ |
neliasso@4112 | 182 | -additionalFile_compiler2 ad_$(Platform_arch_model)_peephole.cpp \ |
neliasso@4112 | 183 | -additionalFile_compiler2 ad_$(Platform_arch_model)_pipeline.cpp \ |
neliasso@4112 | 184 | -additionalFile_compiler2 adGlobals_$(Platform_arch_model).hpp \ |
neliasso@4112 | 185 | -additionalFile_compiler2 dfa_$(Platform_arch_model).cpp \ |
stefank@2314 | 186 | $(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=compiler2) |
duke@435 | 187 | |
duke@435 | 188 | # Add in the jvmti (JSR-163) options |
duke@435 | 189 | # NOTE: do not pull in jvmtiEnvRecommended.cpp. This file is generated |
duke@435 | 190 | # so the programmer can diff it with jvmtiEnv.cpp to be sure the |
duke@435 | 191 | # code merge was done correctly (@see jvmti.make and jvmtiEnvFill.java). |
duke@435 | 192 | # If so, they would then check it in as a new version of jvmtiEnv.cpp. |
stefank@2314 | 193 | ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \ |
neliasso@4112 | 194 | -additionalFile jvmtiEnv.hpp \ |
neliasso@4112 | 195 | -additionalFile jvmtiEnter.cpp \ |
neliasso@4112 | 196 | -additionalFile jvmtiEnterTrace.cpp \ |
neliasso@4112 | 197 | -additionalFile jvmti.h \ |
sla@5237 | 198 | -additionalFile bytecodeInterpreterWithChecks.cpp \ |
sla@5237 | 199 | -additionalFile traceEventClasses.hpp \ |
sla@5237 | 200 | -additionalFile traceEventIds.hpp \ |
sla@5237 | 201 | !if "$(OPENJDK)" != "true" |
sla@5237 | 202 | -additionalFile traceRequestables.hpp \ |
sla@5237 | 203 | -additionalFile traceEventControl.hpp \ |
sla@5237 | 204 | -additionalFile traceProducer.cpp \ |
sla@5237 | 205 | !endif |
sla@5237 | 206 | -additionalFile traceTypes.hpp |