author | rschmelter |
Mon, 11 Mar 2019 05:09:14 -0700 (2019-03-11) | |
changeset 54072 | 9911f18d6a40 |
parent 53995 | ecc2bcc3beb0 |
child 58834 | f78e7ce060b0 |
permissions | -rw-r--r-- |
37437 | 1 |
# |
53157 | 2 |
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
37437 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
7 |
# published by the Free Software Foundation. Oracle designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
|
10 |
# |
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
24 |
# |
|
25 |
||
26 |
# This must be the first rule |
|
27 |
default: all |
|
28 |
||
29 |
include $(SPEC) |
|
30 |
include MakeBase.gmk |
|
31 |
include JavaCompilation.gmk |
|
32 |
include SetupJavaCompilers.gmk |
|
54072 | 33 |
include Execute.gmk |
37437 | 34 |
|
53683 | 35 |
ifeq ($(call isTargetOs, windows), true) |
37437 | 36 |
# The next part is a bit hacky. We include the CompileJvm.gmk to be |
37 |
# able to extact flags, but we do not wish to execute the rules. |
|
38 |
||
39 |
# Use client as base for defines and includes |
|
40 |
JVM_VARIANT=client |
|
41 |
||
42 |
include HotspotCommon.gmk |
|
43 |
include lib/CompileJvm.gmk |
|
44 |
||
45 |
# Reset targets so we don't build libjvm. |
|
46 |
TARGETS := |
|
47 |
||
48 |
# Helper macro to convert a unix path to a Windows path, suitable for |
|
49 |
# inclusion in a command line. |
|
53683 | 50 |
ifeq ($(call isBuildOsEnv, windows.cygwin), true) |
53157 | 51 |
FixPath = \ |
52 |
$(strip $(subst \,\\,$(shell $(CYGPATH) -w $1))) |
|
53 |
FixLinuxExecutable = \ |
|
54 |
$(call FixPath, $1) |
|
53683 | 55 |
else ifeq ($(call isBuildOsEnv, windows.wsl), true) |
53157 | 56 |
FixPath = \ |
57 |
$(strip $(subst \,\\,$(shell $(WSLPATH) -w $1))) |
|
58 |
FixLinuxExecutable = \ |
|
59 |
"%windir%\Sysnative\wsl.exe $1" |
|
60 |
endif |
|
37437 | 61 |
|
62 |
JVM_DEFINES_client := $(patsubst -D%,%, $(filter -D%, $(JVM_CFLAGS))) |
|
63 |
EXTRACTED_DEFINES_client := $(addprefix -define , $(JVM_DEFINES_client)) |
|
64 |
||
65 |
JVM_INCLUDES_client := $(patsubst -I%,%, $(filter -I%, $(JVM_CFLAGS))) |
|
66 |
EXTRACTED_INCLUDES_client := $(foreach path, $(JVM_INCLUDES_client), -absoluteInclude $(call FixPath, $(path))) |
|
67 |
||
68 |
# Hand-code variant-specific arguments, based on the fact that we use |
|
69 |
# client for general arguments. Not optimal but other solutions require |
|
70 |
# major changes in ProjectCreator. |
|
71 |
ADDITIONAL_VARIANT_ARGS := \ |
|
72 |
-define_server COMPILER2 \ |
|
73 |
-ignorePath_client adfiles \ |
|
74 |
-ignorePath_client c2_ \ |
|
75 |
-ignorePath_client runtime_ \ |
|
76 |
-ignorePath_client libadt \ |
|
77 |
-ignorePath_client opto \ |
|
78 |
# |
|
79 |
||
80 |
IGNORED_PLATFORMS_ARGS := \ |
|
81 |
-ignorePath aarch64 \ |
|
82 |
-ignorePath aix \ |
|
83 |
-ignorePath arm \ |
|
84 |
-ignorePath bsd \ |
|
85 |
-ignorePath linux \ |
|
86 |
-ignorePath posix \ |
|
87 |
-ignorePath ppc \ |
|
88 |
-ignorePath solaris \ |
|
89 |
-ignorePath sparc \ |
|
90 |
-ignorePath x86_32 \ |
|
91 |
-ignorePath zero \ |
|
92 |
# |
|
93 |
||
94 |
################################################################################ |
|
95 |
# Build the ProjectCreator java tool. |
|
96 |
||
97 |
TOOLS_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/support/tools_classes |
|
98 |
||
99 |
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \ |
|
100 |
SETUP := GENERATE_OLDBYTECODE, \ |
|
101 |
ADD_JAVAC_FLAGS := -Xlint:-auxiliaryclass, \ |
|
47217 | 102 |
SRC := $(TOPDIR)/make/hotspot/src/classes, \ |
37437 | 103 |
BIN := $(TOOLS_OUTPUTDIR), \ |
104 |
)) |
|
105 |
||
106 |
TARGETS += $(BUILD_PROJECT_CREATOR) |
|
107 |
||
108 |
# Run the ProjectCreator tool |
|
109 |
PROJECT_CREATOR_TOOL := $(JAVA_SMALL) -cp $(TOOLS_OUTPUTDIR) build.tools.projectcreator.ProjectCreator |
|
110 |
||
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47219
diff
changeset
|
111 |
IDE_OUTPUTDIR := $(OUTPUTDIR)/ide/hotspot-visualstudio |
37437 | 112 |
|
113 |
VCPROJ_FILE := $(IDE_OUTPUTDIR)/jvm.vcxproj |
|
114 |
||
115 |
PROJECT_CREATOR_CLASS := build.tools.projectcreator.WinGammaPlatformVC10 |
|
116 |
||
117 |
# We hard-code gensrc dir to server (since this includes adfiles) |
|
118 |
PROJECT_CREATOR_ARGS := \ |
|
47219 | 119 |
-sourceBase $(call FixPath, $(TOPDIR)/src) \ |
120 |
-startAt hotspot \ |
|
121 |
-relativeSrcInclude hotspot \ |
|
37437 | 122 |
-hidePath .hg \ |
123 |
-hidePath .jcheck \ |
|
43972 | 124 |
-hidePath jdk.aot \ |
37437 | 125 |
-hidePath jdk.hotspot.agent \ |
43972 | 126 |
-hidePath jdk.internal.vm.ci \ |
127 |
-hidePath jdk.internal.vm.compiler \ |
|
37437 | 128 |
-hidePath jdk.jfr \ |
129 |
-compiler VC10 \ |
|
130 |
-jdkTargetRoot $(call FixPath, $(JDK_OUTPUTDIR)) \ |
|
131 |
-platformName x64 \ |
|
132 |
-buildBase $(call FixPath, $(IDE_OUTPUTDIR)/vs-output) \ |
|
133 |
-buildSpace $(call FixPath, $(IDE_OUTPUTDIR)) \ |
|
53157 | 134 |
-makeBinary $(call FixLinuxExecutable, $(MAKE)) \ |
43424
5c5d1360b2d3
8168137: import-hotspot build target not removed from hotspot-ide-project
ctornqvi
parents:
38097
diff
changeset
|
135 |
-makeOutput $(call FixPath, $(JDK_OUTPUTDIR)/bin/server) \ |
37437 | 136 |
-absoluteInclude $(call FixPath, $(HOTSPOT_OUTPUTDIR)/variant-server/gensrc) \ |
137 |
-absoluteSrcInclude $(call FixPath, $(HOTSPOT_OUTPUTDIR)/variant-server/gensrc) \ |
|
138 |
$(EXTRACTED_DEFINES_client) \ |
|
139 |
$(EXTRACTED_INCLUDES_client) \ |
|
140 |
$(ADDITIONAL_VARIANT_ARGS) \ |
|
141 |
$(IGNORED_PLATFORMS_ARGS) \ |
|
142 |
# |
|
143 |
||
144 |
VCPROJ_VARDEPS := $(PROJECT_CREATOR_CLASS) $(PROJECT_CREATOR_ARGS) |
|
145 |
VCPROJ_VARDEPS_FILE := $(call DependOnVariable, VCPROJ_VARDEPS, \ |
|
146 |
$(VCPROJ_FILE).vardeps) |
|
147 |
||
53995 | 148 |
$(eval $(call SetupExecute, vcproj_file, \ |
149 |
INFO := Generating Visual Studio project file, \ |
|
150 |
DEPS := $(BUILD_PROJECT_CREATOR) $(VCPROJ_VARDEPS_FILE), \ |
|
151 |
OUTPUT_FILE := $(VCPROJ_FILE), \ |
|
152 |
COMMAND := $(PROJECT_CREATOR_TOOL) $(PROJECT_CREATOR_CLASS) \ |
|
54072 | 153 |
$(PROJECT_CREATOR_ARGS) -projectFileName $(call FixPath, $(VCPROJ_FILE)) \ |
53995 | 154 |
$(LOG_INFO), \ |
155 |
)) |
|
37437 | 156 |
|
53995 | 157 |
TARGETS += $(vcproj_file_TARGET) |
37437 | 158 |
|
159 |
all: $(TARGETS) |
|
160 |
||
161 |
else |
|
162 |
all: |
|
163 |
$(info Hotspot Visual Studio generation only supported on Windows) |
|
164 |
endif |
|
165 |
||
166 |
.PHONY: all |