< prev index next >

make/gendata/Gendata-jdk.compiler.gmk

Print this page


   1 #
   2 # Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
   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


  37 $(eval $(call ReadImportMetaData))
  38 
  39 # Modules that should be visible for 9 - the documented modules:
  40 CT_MODULES := $(DOCS_MODULES)
  41 
  42 # Get the complete module source path:
  43 CT_MODULESOURCEPATH := $(call GetModuleSrcPath)
  44 
  45 CT_DATA_DESCRIPTION += $(TOPDIR)/make/data/symbols/symbols
  46 
  47 COMPILECREATESYMBOLS_ADD_EXPORTS := \
  48     --add-exports java.base/jdk.internal=java.compiler.interim,jdk.compiler.interim \
  49     --add-exports jdk.compiler.interim/com.sun.tools.javac.api=ALL-UNNAMED \
  50     --add-exports jdk.compiler.interim/com.sun.tools.javac.code=ALL-UNNAMED \
  51     --add-exports jdk.compiler.interim/com.sun.tools.javac.util=ALL-UNNAMED \
  52     --add-exports jdk.compiler.interim/com.sun.tools.javac.jvm=ALL-UNNAMED \
  53     #
  54 
  55 $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
  56     SETUP := GENERATE_OLDBYTECODE, \
  57     SRC := $(TOPDIR)/make/langtools/src/classes \
  58         $(TOPDIR)/src/jdk.jdeps/share/classes, \
  59     INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
  60     BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
  61     ADD_JAVAC_FLAGS := $(INTERIM_LANGTOOLS_ARGS) \
  62         --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
  63         $(COMPILECREATESYMBOLS_ADD_EXPORTS), \
  64 ))
  65 
  66 $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
  67     $(COMPILE_CREATE_SYMBOLS) \
  68     $(wildcard $(TOPDIR)/make/data/symbols/*) \
  69     $(MODULE_INFOS)
  70         $(RM) -r $(@D)
  71         $(MKDIR) -p $(@D)
  72         $(ECHO) Creating ct.sym classes
  73         $(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
  74             $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
  75             -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
  76             build.tools.symbolgenerator.CreateSymbols \
  77             build-ctsym \
  78             $(CT_DATA_DESCRIPTION) \
  79             $(@D)
  80         $(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
  81             $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
  82             -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
  83             build.tools.symbolgenerator.TransitiveDependencies \
  84             $(@D) \
  85             $(CT_MODULESOURCEPATH) \
  86             $(CT_MODULES)
  87         $(TOUCH) $@
  88 
  89 # Can't generate ct.sym directly into modules libs as the SetupJarArchive macro
  90 # creates meta data files in the output dir.
  91 $(eval $(call SetupJarArchive, CREATE_CTSYM, \
  92     DEPENDENCIES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols, \
  93     SRCS := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files, \
  94     SUFFIXES := .sig system-modules, \
  95     JAR := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
  96 ))
  97 
  98 # Copy ct.sym to the modules libs dir
  99 $(eval $(call SetupCopyFiles, COPY_TO_LIBS, \
 100     FILES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
 101     DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.compiler, \
 102 ))
 103 
   1 #
   2 # Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
   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


  37 $(eval $(call ReadImportMetaData))
  38 
  39 # Modules that should be visible for 9 - the documented modules:
  40 CT_MODULES := $(DOCS_MODULES)
  41 
  42 # Get the complete module source path:
  43 CT_MODULESOURCEPATH := $(call GetModuleSrcPath)
  44 
  45 CT_DATA_DESCRIPTION += $(TOPDIR)/make/data/symbols/symbols
  46 
  47 COMPILECREATESYMBOLS_ADD_EXPORTS := \
  48     --add-exports java.base/jdk.internal=java.compiler.interim,jdk.compiler.interim \
  49     --add-exports jdk.compiler.interim/com.sun.tools.javac.api=ALL-UNNAMED \
  50     --add-exports jdk.compiler.interim/com.sun.tools.javac.code=ALL-UNNAMED \
  51     --add-exports jdk.compiler.interim/com.sun.tools.javac.util=ALL-UNNAMED \
  52     --add-exports jdk.compiler.interim/com.sun.tools.javac.jvm=ALL-UNNAMED \
  53     #
  54 
  55 $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
  56     SETUP := GENERATE_OLDBYTECODE, \
  57     SRC := $(TOPDIR)/src/jdk.compiler/share/tools \
  58         $(TOPDIR)/src/jdk.jdeps/share/classes, \
  59     INCLUDES := org/openjdk/buildtools/symbolgenerator com/sun/tools/classfile, \
  60     BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
  61     ADD_JAVAC_FLAGS := $(INTERIM_LANGTOOLS_ARGS) \
  62         --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
  63         $(COMPILECREATESYMBOLS_ADD_EXPORTS), \
  64 ))
  65 
  66 $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
  67     $(COMPILE_CREATE_SYMBOLS) \
  68     $(wildcard $(TOPDIR)/make/data/symbols/*) \
  69     $(MODULE_INFOS)
  70         $(RM) -r $(@D)
  71         $(MKDIR) -p $(@D)
  72         $(ECHO) Creating ct.sym classes
  73         $(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
  74             $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
  75             -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
  76             org.openjdk.buildtools.symbolgenerator.CreateSymbols \
  77             build-ctsym \
  78             $(CT_DATA_DESCRIPTION) \
  79             $(@D)
  80         $(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
  81             $(COMPILECREATESYMBOLS_ADD_EXPORTS) \
  82             -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
  83             org.openjdk.buildtools.symbolgenerator.TransitiveDependencies \
  84             $(@D) \
  85             $(CT_MODULESOURCEPATH) \
  86             $(CT_MODULES)
  87         $(TOUCH) $@
  88 
  89 # Can't generate ct.sym directly into modules libs as the SetupJarArchive macro
  90 # creates meta data files in the output dir.
  91 $(eval $(call SetupJarArchive, CREATE_CTSYM, \
  92     DEPENDENCIES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols, \
  93     SRCS := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files, \
  94     SUFFIXES := .sig system-modules, \
  95     JAR := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
  96 ))
  97 
  98 # Copy ct.sym to the modules libs dir
  99 $(eval $(call SetupCopyFiles, COPY_TO_LIBS, \
 100     FILES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
 101     DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.compiler, \
 102 ))
 103 
< prev index next >