make/CompileInterimLangtools.gmk
branchihse-cflags-rewrite-branch
changeset 58734 c4be316c3df4
parent 58713 ad69fd32778e
equal deleted inserted replaced
58733:fd8dc801ef32 58734:c4be316c3df4
    47 	$(SED) $(INTERIM_MODULEINFO_PATTERN) $< > $@
    47 	$(SED) $(INTERIM_MODULEINFO_PATTERN) $< > $@
    48 
    48 
    49 TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
    49 TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
    50     $(INTERIM_LANGTOOLS_MODULES))
    50     $(INTERIM_LANGTOOLS_MODULES))
    51 
    51 
       
    52 $(eval $(call SetupCopyFiles, COPY_PREVIEW_FEATURES, \
       
    53     FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/PreviewFeature.java, \
       
    54     DEST := $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim/jdk/internal/, \
       
    55 ))
       
    56 
       
    57 TARGETS += $(COPY_PREVIEW_FEATURES)
       
    58 
    52 ################################################################################
    59 ################################################################################
    53 # Setup the rules to build interim langtools, which is compiled by the boot
    60 # Setup the rules to build interim langtools, which is compiled by the boot
    54 # javac and can be run on the boot jdk. This will be used to compile the rest of
    61 # javac and can be run on the boot jdk. This will be used to compile the rest of
    55 # the product. Each module is compiled separately because a multi module setup
    62 # the product. Each module is compiled separately because a multi module setup
    56 # would require the source files to be copied into directories named after the
    63 # would require the source files to be copied into directories named after the
    70       EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
    77       EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
    71       COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
    78       COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
    72       BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
    79       BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
    73       ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
    80       ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
    74           $$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
    81           $$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
       
    82           --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
       
    83           --add-exports java.base/jdk.internal=jdk.compiler.interim \
    75           -Xlint:-module, \
    84           -Xlint:-module, \
    76   ))
    85   ))
    77 
    86 
    78   $1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
    87   $1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
    79       $$(INTERIM_LANGTOOLS_BASE_MODULES), $$(call FindTransitiveDepsForModule, $1)))
    88       $$(INTERIM_LANGTOOLS_BASE_MODULES), $$(call FindTransitiveDepsForModule, $1)))
    80 
    89 
    81   $$(BUILD_$1.interim): $$(foreach d, $$($1_DEPS_INTERIM), $$(BUILD_$$d))
    90   $$(BUILD_$1.interim): $$(foreach d, $$($1_DEPS_INTERIM), $$(BUILD_$$d)) $(COPY_PREVIEW_FEATURES)
    82 
    91 
    83   TARGETS += $$(BUILD_$1.interim)
    92   TARGETS += $$(BUILD_$1.interim)
    84 endef
    93 endef
    85 
    94 
    86 $(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), \
    95 $(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), \