jdk-24/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk

153 lines
6.0 KiB
Plaintext
Raw Normal View History

8166417: Integrate Graal-core into JDK for AOT compiler Co-authored-by: Lukas Stadler <lukas.stadler@oracle.com> Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com> Co-authored-by: Roland Schatz <roland.schatz@oracle.com> Co-authored-by: Josef Eisl <josef.eisl@jku.at> Co-authored-by: Christian Wimmer <christian.wimmer@oracle.com> Co-authored-by: Chris Thalinger <cthalinger@twitter.com> Co-authored-by: Gilles Duboscq <gilles.m.duboscq@oracle.com> Co-authored-by: David Leopoldseder <david.d.leopoldseder@oracle.com> Co-authored-by: Stefan Anzinger <stefan.anzinger@oracle.com> Co-authored-by: Christian Humer <christian.humer@oracle.com> Co-authored-by: Michael Berg <michael.c.berg@intel.com> Co-authored-by: Bernhard Urban <bernhard.urban@jku.at> Co-authored-by: Miguel Garcia <miguel.m.garcia@oracle.com> Co-authored-by: Yudi Zheng <yudi.zheng@usi.ch> Co-authored-by: Christos Kotselidis <christos.kotselidis@oracle.com> Co-authored-by: Andreas Woess <andreas.woess@jku.at> Co-authored-by: Stefan Rumzucker <stefan.rumzucker@jku.at> Co-authored-by: Aleksandar Prokopec <aleksandar.prokopec@oracle.com> Co-authored-by: Christian Haeubl <haeubl@ssw.jku.at> Co-authored-by: Morris Meyer <morris.meyer@oracle.com> Co-authored-by: Matthias Grimmer <grimmer@ssw.jku.at> Co-authored-by: Erik Eckstein <erik.eckstein@oracle.com> Co-authored-by: Josef Haider <josef.haider@jku.at> Co-authored-by: Manuel Rigger <rigger.manuel@gmail.com> Co-authored-by: Michael Haupt <michael.haupt@oracle.com> Co-authored-by: Niclas Adlertz <niclas.adlertz@oracle.com> Co-authored-by: Jaroslav Tulach <jaroslav.tulach@oracle.com> Co-authored-by: Chris Seaton <chris.seaton@oracle.com> Co-authored-by: Peter Kessler <peter.b.kessler@oracle.com> Co-authored-by: Christian Wirth <christian.wirth@oracle.com> Co-authored-by: Benoit Daloze <benoit.d.daloze@oracle.com> Reviewed-by: iveresov, kvn, erikj, ihse, mchung
2016-12-11 20:05:57 +00:00
#
# Copyright (c) 2016, 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.
#
default: all
include $(SPEC)
include MakeBase.gmk
$(eval $(call IncludeCustomExtension, gensrc/Gensrc-jdk.internal.vm.compiler.gmk))
8166417: Integrate Graal-core into JDK for AOT compiler Co-authored-by: Lukas Stadler <lukas.stadler@oracle.com> Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com> Co-authored-by: Roland Schatz <roland.schatz@oracle.com> Co-authored-by: Josef Eisl <josef.eisl@jku.at> Co-authored-by: Christian Wimmer <christian.wimmer@oracle.com> Co-authored-by: Chris Thalinger <cthalinger@twitter.com> Co-authored-by: Gilles Duboscq <gilles.m.duboscq@oracle.com> Co-authored-by: David Leopoldseder <david.d.leopoldseder@oracle.com> Co-authored-by: Stefan Anzinger <stefan.anzinger@oracle.com> Co-authored-by: Christian Humer <christian.humer@oracle.com> Co-authored-by: Michael Berg <michael.c.berg@intel.com> Co-authored-by: Bernhard Urban <bernhard.urban@jku.at> Co-authored-by: Miguel Garcia <miguel.m.garcia@oracle.com> Co-authored-by: Yudi Zheng <yudi.zheng@usi.ch> Co-authored-by: Christos Kotselidis <christos.kotselidis@oracle.com> Co-authored-by: Andreas Woess <andreas.woess@jku.at> Co-authored-by: Stefan Rumzucker <stefan.rumzucker@jku.at> Co-authored-by: Aleksandar Prokopec <aleksandar.prokopec@oracle.com> Co-authored-by: Christian Haeubl <haeubl@ssw.jku.at> Co-authored-by: Morris Meyer <morris.meyer@oracle.com> Co-authored-by: Matthias Grimmer <grimmer@ssw.jku.at> Co-authored-by: Erik Eckstein <erik.eckstein@oracle.com> Co-authored-by: Josef Haider <josef.haider@jku.at> Co-authored-by: Manuel Rigger <rigger.manuel@gmail.com> Co-authored-by: Michael Haupt <michael.haupt@oracle.com> Co-authored-by: Niclas Adlertz <niclas.adlertz@oracle.com> Co-authored-by: Jaroslav Tulach <jaroslav.tulach@oracle.com> Co-authored-by: Chris Seaton <chris.seaton@oracle.com> Co-authored-by: Peter Kessler <peter.b.kessler@oracle.com> Co-authored-by: Christian Wirth <christian.wirth@oracle.com> Co-authored-by: Benoit Daloze <benoit.d.daloze@oracle.com> Reviewed-by: iveresov, kvn, erikj, ihse, mchung
2016-12-11 20:05:57 +00:00
GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)
SRC_DIR := $(TOPDIR)/src/$(MODULE)/share/classes
8166417: Integrate Graal-core into JDK for AOT compiler Co-authored-by: Lukas Stadler <lukas.stadler@oracle.com> Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com> Co-authored-by: Roland Schatz <roland.schatz@oracle.com> Co-authored-by: Josef Eisl <josef.eisl@jku.at> Co-authored-by: Christian Wimmer <christian.wimmer@oracle.com> Co-authored-by: Chris Thalinger <cthalinger@twitter.com> Co-authored-by: Gilles Duboscq <gilles.m.duboscq@oracle.com> Co-authored-by: David Leopoldseder <david.d.leopoldseder@oracle.com> Co-authored-by: Stefan Anzinger <stefan.anzinger@oracle.com> Co-authored-by: Christian Humer <christian.humer@oracle.com> Co-authored-by: Michael Berg <michael.c.berg@intel.com> Co-authored-by: Bernhard Urban <bernhard.urban@jku.at> Co-authored-by: Miguel Garcia <miguel.m.garcia@oracle.com> Co-authored-by: Yudi Zheng <yudi.zheng@usi.ch> Co-authored-by: Christos Kotselidis <christos.kotselidis@oracle.com> Co-authored-by: Andreas Woess <andreas.woess@jku.at> Co-authored-by: Stefan Rumzucker <stefan.rumzucker@jku.at> Co-authored-by: Aleksandar Prokopec <aleksandar.prokopec@oracle.com> Co-authored-by: Christian Haeubl <haeubl@ssw.jku.at> Co-authored-by: Morris Meyer <morris.meyer@oracle.com> Co-authored-by: Matthias Grimmer <grimmer@ssw.jku.at> Co-authored-by: Erik Eckstein <erik.eckstein@oracle.com> Co-authored-by: Josef Haider <josef.haider@jku.at> Co-authored-by: Manuel Rigger <rigger.manuel@gmail.com> Co-authored-by: Michael Haupt <michael.haupt@oracle.com> Co-authored-by: Niclas Adlertz <niclas.adlertz@oracle.com> Co-authored-by: Jaroslav Tulach <jaroslav.tulach@oracle.com> Co-authored-by: Chris Seaton <chris.seaton@oracle.com> Co-authored-by: Peter Kessler <peter.b.kessler@oracle.com> Co-authored-by: Christian Wirth <christian.wirth@oracle.com> Co-authored-by: Benoit Daloze <benoit.d.daloze@oracle.com> Reviewed-by: iveresov, kvn, erikj, ihse, mchung
2016-12-11 20:05:57 +00:00
################################################################################
PROC_SRC_SUBDIRS := \
org.graalvm.compiler.code \
org.graalvm.compiler.core \
org.graalvm.compiler.core.aarch64 \
org.graalvm.compiler.core.amd64 \
org.graalvm.compiler.core.common \
org.graalvm.compiler.core.sparc \
org.graalvm.compiler.debug \
org.graalvm.compiler.hotspot \
org.graalvm.compiler.hotspot.aarch64 \
org.graalvm.compiler.hotspot.amd64 \
org.graalvm.compiler.hotspot.sparc \
org.graalvm.compiler.graph \
org.graalvm.compiler.java \
org.graalvm.compiler.lir \
org.graalvm.compiler.lir.amd64 \
org.graalvm.compiler.loop \
org.graalvm.compiler.loop.phases \
org.graalvm.compiler.nodes \
org.graalvm.compiler.replacements \
org.graalvm.compiler.replacements.aarch64 \
org.graalvm.compiler.replacements.amd64 \
org.graalvm.compiler.phases \
org.graalvm.compiler.phases.common \
org.graalvm.compiler.printer \
org.graalvm.compiler.virtual \
#
PROC_SRC_DIRS := $(patsubst %, $(SRC_DIR)/%/src, $(PROC_SRC_SUBDIRS))
PROC_SRCS := $(filter %.java, $(call CacheFind, $(PROC_SRC_DIRS)))
ALL_SRC_DIRS := $(wildcard $(SRC_DIR)/*/src)
SOURCEPATH := $(call PathList, $(ALL_SRC_DIRS))
PROCESSOR_JARS := \
$(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor.jar \
$(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor.jar \
$(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.options.processor.jar \
$(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
$(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor.jar \
#
PROCESSOR_PATH := $(call PathList, $(PROCESSOR_JARS))
ADD_EXPORTS := \
--add-modules jdk.internal.vm.ci \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.common=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.events=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspotvmconfig=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.inittimer=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.services=ALL-UNNAMED \
--add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=ALL-UNNAMED \
8166417: Integrate Graal-core into JDK for AOT compiler Co-authored-by: Lukas Stadler <lukas.stadler@oracle.com> Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com> Co-authored-by: Roland Schatz <roland.schatz@oracle.com> Co-authored-by: Josef Eisl <josef.eisl@jku.at> Co-authored-by: Christian Wimmer <christian.wimmer@oracle.com> Co-authored-by: Chris Thalinger <cthalinger@twitter.com> Co-authored-by: Gilles Duboscq <gilles.m.duboscq@oracle.com> Co-authored-by: David Leopoldseder <david.d.leopoldseder@oracle.com> Co-authored-by: Stefan Anzinger <stefan.anzinger@oracle.com> Co-authored-by: Christian Humer <christian.humer@oracle.com> Co-authored-by: Michael Berg <michael.c.berg@intel.com> Co-authored-by: Bernhard Urban <bernhard.urban@jku.at> Co-authored-by: Miguel Garcia <miguel.m.garcia@oracle.com> Co-authored-by: Yudi Zheng <yudi.zheng@usi.ch> Co-authored-by: Christos Kotselidis <christos.kotselidis@oracle.com> Co-authored-by: Andreas Woess <andreas.woess@jku.at> Co-authored-by: Stefan Rumzucker <stefan.rumzucker@jku.at> Co-authored-by: Aleksandar Prokopec <aleksandar.prokopec@oracle.com> Co-authored-by: Christian Haeubl <haeubl@ssw.jku.at> Co-authored-by: Morris Meyer <morris.meyer@oracle.com> Co-authored-by: Matthias Grimmer <grimmer@ssw.jku.at> Co-authored-by: Erik Eckstein <erik.eckstein@oracle.com> Co-authored-by: Josef Haider <josef.haider@jku.at> Co-authored-by: Manuel Rigger <rigger.manuel@gmail.com> Co-authored-by: Michael Haupt <michael.haupt@oracle.com> Co-authored-by: Niclas Adlertz <niclas.adlertz@oracle.com> Co-authored-by: Jaroslav Tulach <jaroslav.tulach@oracle.com> Co-authored-by: Chris Seaton <chris.seaton@oracle.com> Co-authored-by: Peter Kessler <peter.b.kessler@oracle.com> Co-authored-by: Christian Wirth <christian.wirth@oracle.com> Co-authored-by: Benoit Daloze <benoit.d.daloze@oracle.com> Reviewed-by: iveresov, kvn, erikj, ihse, mchung
2016-12-11 20:05:57 +00:00
#
$(GENSRC_DIR)/_gensrc_proc_done: $(PROC_SRCS) $(PROCESSOR_JARS)
$(call MakeDir, $(@D))
$(eval $(call ListPathsSafely,PROC_SRCS,$(@D)/_gensrc_proc_files))
$(JAVA_SMALL) $(NEW_JAVAC) \
-XDignore.symbol.file \
--upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
$(ADD_EXPORTS) \
-sourcepath $(SOURCEPATH) \
-implicit:none \
-proc:only \
-processorpath $(PROCESSOR_PATH) \
-d $(GENSRC_DIR) \
-s $(GENSRC_DIR) \
@$(@D)/_gensrc_proc_files
$(TOUCH) $@
TARGETS += $(GENSRC_DIR)/_gensrc_proc_done
################################################################################
$(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done
($(CD) $(GENSRC_DIR)/META-INF/providers && \
p=""; \
for i in $$($(LS)); do \
c=$$($(CAT) $$i | $(TR) -d '\n\r'); \
if test x$$p != x$$c; then \
if test x$$p != x; then \
$(ECHO) " ;" >> $@; \
fi; \
$(ECHO) "provides $$c with" >> $@; \
p=$$c; \
fi; \
$(ECHO) " $$i," >> $@; \
done); \
$(ECHO) " ;" >> $@; \
$(ECHO) "uses org.graalvm.compiler.options.OptionDescriptors;" >> $@; \
$(ECHO) "provides org.graalvm.compiler.options.OptionDescriptors with" >> $@; \
for i in $$($(FIND) $(GENSRC_DIR) -name '*_OptionDescriptors.java'); do \
c=$$($(ECHO) $$i | $(SED) 's:.*/jdk\.internal\.vm\.compiler/\(.*\)\.java:\1:' | $(TR) '/' '.'); \
8166417: Integrate Graal-core into JDK for AOT compiler Co-authored-by: Lukas Stadler <lukas.stadler@oracle.com> Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com> Co-authored-by: Roland Schatz <roland.schatz@oracle.com> Co-authored-by: Josef Eisl <josef.eisl@jku.at> Co-authored-by: Christian Wimmer <christian.wimmer@oracle.com> Co-authored-by: Chris Thalinger <cthalinger@twitter.com> Co-authored-by: Gilles Duboscq <gilles.m.duboscq@oracle.com> Co-authored-by: David Leopoldseder <david.d.leopoldseder@oracle.com> Co-authored-by: Stefan Anzinger <stefan.anzinger@oracle.com> Co-authored-by: Christian Humer <christian.humer@oracle.com> Co-authored-by: Michael Berg <michael.c.berg@intel.com> Co-authored-by: Bernhard Urban <bernhard.urban@jku.at> Co-authored-by: Miguel Garcia <miguel.m.garcia@oracle.com> Co-authored-by: Yudi Zheng <yudi.zheng@usi.ch> Co-authored-by: Christos Kotselidis <christos.kotselidis@oracle.com> Co-authored-by: Andreas Woess <andreas.woess@jku.at> Co-authored-by: Stefan Rumzucker <stefan.rumzucker@jku.at> Co-authored-by: Aleksandar Prokopec <aleksandar.prokopec@oracle.com> Co-authored-by: Christian Haeubl <haeubl@ssw.jku.at> Co-authored-by: Morris Meyer <morris.meyer@oracle.com> Co-authored-by: Matthias Grimmer <grimmer@ssw.jku.at> Co-authored-by: Erik Eckstein <erik.eckstein@oracle.com> Co-authored-by: Josef Haider <josef.haider@jku.at> Co-authored-by: Manuel Rigger <rigger.manuel@gmail.com> Co-authored-by: Michael Haupt <michael.haupt@oracle.com> Co-authored-by: Niclas Adlertz <niclas.adlertz@oracle.com> Co-authored-by: Jaroslav Tulach <jaroslav.tulach@oracle.com> Co-authored-by: Chris Seaton <chris.seaton@oracle.com> Co-authored-by: Peter Kessler <peter.b.kessler@oracle.com> Co-authored-by: Christian Wirth <christian.wirth@oracle.com> Co-authored-by: Benoit Daloze <benoit.d.daloze@oracle.com> Reviewed-by: iveresov, kvn, erikj, ihse, mchung
2016-12-11 20:05:57 +00:00
$(ECHO) " $$c," >> $@; \
done; \
$(ECHO) " ;" >> $@;
TARGETS += $(GENSRC_DIR)/module-info.java.extra
################################################################################
all: $(TARGETS)
.PHONY: default all