8054717: SJavac should track changes in the public apis of classpath classes!
Adjusted Java compilation to accomodate for changes to sjavac. Reviewed-by: erikj
This commit is contained in:
parent
27b1730c95
commit
ebd11a8353
@ -507,6 +507,10 @@ JAVA_MODULES := $(ALL_JAVA_MODULES)
|
||||
# space separated list.
|
||||
JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
|
||||
|
||||
# Create an empty directory to set the bootclasspath to.
|
||||
EMPTY_BOOTCLASSPATH := $(SUPPORT_OUTPUTDIR)/empty-dir
|
||||
$(call MakeDir, $(EMPTY_BOOTCLASSPATH))
|
||||
|
||||
# This macro sets up compilation of a module and declares dependencies for it.
|
||||
# Param 1 - module name
|
||||
define SetupModuleCompilation
|
||||
@ -525,7 +529,7 @@ define SetupModuleCompilation
|
||||
$1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
|
||||
endif
|
||||
$1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
|
||||
$1_JAVAC_FLAGS := -bootclasspath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
|
||||
$1_JAVAC_FLAGS := -bootclasspath $(EMPTY_BOOTCLASSPATH) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
|
||||
|
||||
$$(eval $$(call SetupJavaCompilation,$1, \
|
||||
SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
|
||||
|
@ -561,10 +561,6 @@ define SetupJavaCompilationBody
|
||||
|
||||
$$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
|
||||
$(MKDIR) -p $$(@D) $$(dir $$($1_SJAVAC_PORTFILE))
|
||||
# As a workaround for sjavac not tracking api changed from the classpath, force full
|
||||
# recompile if an external dependency, which is something other than a source
|
||||
# change, triggered this compilation.
|
||||
$$(if $$(filter-out $$($1_SRCS), $$?), $(FIND) $$(@D) -name "*.class" $(FIND_DELETE))
|
||||
$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
|
||||
$(ECHO) Compiling $1
|
||||
($$($1_JVM) $$($1_SJAVAC) \
|
||||
|
Loading…
Reference in New Issue
Block a user