-
Notifications
You must be signed in to change notification settings - Fork 156
8377101: [lworld] Automatically generate value class sources based on source annotations #2180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: lworld
Are you sure you want to change the base?
Changes from 16 commits
dff38b3
166340d
6176d2b
1816326
64a70a6
f983aae
881192f
5514cc5
8b1bdce
5ac41de
9f7ba1c
e6846dc
1fe6c3e
89df018
cd6781d
800d6ff
12a20e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ include MakeFileStart.gmk | |
|
|
||
| include JavaCompilation.gmk | ||
| include Modules.gmk | ||
| include ToolsJdk.gmk | ||
|
|
||
| include CopyFiles.gmk | ||
|
|
||
|
|
@@ -68,6 +69,22 @@ MODULESOURCEPATH := $(call GetModuleSrcPath) | |
| # Add imported modules to the modulepath | ||
| MODULEPATH := $(call PathList, $(IMPORT_MODULES_CLASSES)) | ||
|
|
||
| ################################################################################ | ||
| # Setup preprocessor flags | ||
| # The output directory must be present in GENERATED_PREVIEW_SUBDIRS in Modules.gmk. | ||
| # Temporarily restrict this to java.base, but it can be expanded later. | ||
| # TODO: Remove Xlint directives below once the fix in JDK-8378740 is merged into lworld. | ||
|
|
||
| ifeq ($(MODULE), java.base) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is only ever for java.base, then consider putting the whole thing in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Restricting it to java.base is because it's used for every module, there's a build failure for one of the modules. |
||
| PREPROCESSOR_FLAGS := \ | ||
| -Xlint:-removal -Xlint:-processing \ | ||
|
||
| -Avalueclasses.outdir=$(SUPPORT_OUTPUTDIR)/gensrc-valueclasses \ | ||
| -processor $(VALUETYPE_GENSRC_PROCESSOR_NAME) | ||
|
|
||
| PROCESSOR_PATH += $(VALUETYPE_GENSRC_PROCESSOR_PATH) | ||
| DEPENDS += $(BUILD_VALUETYPE_GENSRC) | ||
| endif | ||
|
|
||
| ################################################################################ | ||
| # Copy zh_HK properties files from zh_TW (needed by some modules) | ||
|
|
||
|
|
@@ -107,6 +124,7 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \ | |
| MODULE := $(MODULE), \ | ||
| SRC := $(wildcard $(MODULE_SRC_DIRS)), \ | ||
| INCLUDES := $(JDK_USER_DEFINED_FILTER), \ | ||
| DEPENDS := $(DEPENDS), \ | ||
| FAIL_NO_SRC := $(FAIL_NO_SRC), \ | ||
| BIN := $(COMPILATION_OUTPUTDIR), \ | ||
| HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \ | ||
|
|
@@ -120,9 +138,11 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \ | |
| EXCLUDE_PATTERNS := -files, \ | ||
| KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \ | ||
| TARGET_RELEASE := $(TARGET_RELEASE), \ | ||
| PROCESSOR_PATH := $(PROCESSOR_PATH), \ | ||
| JAVAC_FLAGS := \ | ||
| $(DOCLINT) \ | ||
| $(JAVAC_FLAGS) \ | ||
| $(PREPROCESSOR_FLAGS) \ | ||
| --module-source-path $(MODULESOURCEPATH) \ | ||
| --module-path $(MODULEPATH) \ | ||
| --system none, \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's integrate this after you remove the directives and this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove the "removal" directive, but not the "processor" one, since that's "correctly" reporting unused annotations. I'm in discussion with Jan to see if we can do better.