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