Proposal: Make custom extension point additions

Erik Joelsson erik.joelsson at oracle.com
Wed Jan 31 17:39:53 UTC 2018


Hello Andrew,

This suggestion looks reasonable to me. Just a minor note on the 
placement of the post hooks. Especially in the Lib-* files, each 
individual library, or link entity, is put within ### separator lines. 
In the two files you modified, since there is only one library declared, 
this isn't as apparent. I would prefer if the post hook came after all 
the declared library sections instead of inside one of them. The Gensrc 
file is more of a snowflake so the placement is reasonable there.

/Erik


On 2018-01-31 03:21, Andrew Leonard wrote:
> Hi,
> I would like to find a sponsor for this change please?
> To support certain extension capabilities I would like to propose the
> following patch to the following make files, summary of changes:
>      M make/common/SetupJavaCompilers.gmk
>          ==> Add IncludeCustomExtension hook and allow custom override of
> DISABLE_WARNINGS and JAVAC_WARNINGS
>      M make/gensrc/GensrcVarHandles.gmk
>          ==> Add IncludeCustomExtension "post" hook
>      M make/lib/Lib-java.management.gmk
>          ==> Add IncludeCustomExtension "post" hook
>      M make/lib/Lib-jdk.management.gmk
>          ==> Add IncludeCustomExtension "post" hook
>
> Many thanks,
> Andrew
>
> hg diff -g output:
> diff --git a/make/common/SetupJavaCompilers.gmk
> b/make/common/SetupJavaCompilers.gmk
> --- a/make/common/SetupJavaCompilers.gmk
> +++ b/make/common/SetupJavaCompilers.gmk
> @@ -26,13 +26,16 @@
>   ifndef _SETUP_GMK
>   _SETUP_GMK := 1
>   
> +# Include custom extension hook
> +$(eval $(call IncludeCustomExtension, common/SetupJavaCompilers.gmk))
> +
>   include JavaCompilation.gmk
>   
> -DISABLE_WARNINGS :=
> -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
> +DISABLE_WARNINGS ?=
> -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
>   
>   # If warnings needs to be non-fatal for testing purposes use a command
> like:
>   # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
> -JAVAC_WARNINGS := -Xlint:all -Werror
> +JAVAC_WARNINGS ?= -Xlint:all -Werror
>   
>   # The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools
>   # and the interim javac, to be run by the boot jdk.
> diff --git a/make/gensrc/GensrcVarHandles.gmk
> b/make/gensrc/GensrcVarHandles.gmk
> --- a/make/gensrc/GensrcVarHandles.gmk
> +++ b/make/gensrc/GensrcVarHandles.gmk
> @@ -167,4 +167,7 @@
>   $(foreach t, $(VARHANDLES_BYTE_ARRAY_TYPES), \
>     $(eval $(call GenerateVarHandleByteArray,VAR_HANDLE_BYTE_ARRAY_$t,$t)))
>   
> +# Include custom extension post hook
> +$(eval $(call IncludeCustomExtension, gensrc/GensrcVarHandles-post.gmk))
> +
>   GENSRC_JAVA_BASE += $(GENSRC_VARHANDLES)
> diff --git a/make/lib/Lib-java.management.gmk
> b/make/lib/Lib-java.management.gmk
> --- a/make/lib/Lib-java.management.gmk
> +++ b/make/lib/Lib-java.management.gmk
> @@ -67,6 +67,9 @@
>   
>   $(BUILD_LIBMANAGEMENT): $(call FindLib, java.base, java)
>   
> +# Include custom extension post hook
> +$(eval $(call IncludeCustomExtension, lib/Lib-java.management-post.gmk))
> +
>   TARGETS += $(BUILD_LIBMANAGEMENT)
>   
>   
> ################################################################################
> diff --git a/make/lib/Lib-jdk.management.gmk
> b/make/lib/Lib-jdk.management.gmk
> --- a/make/lib/Lib-jdk.management.gmk
> +++ b/make/lib/Lib-jdk.management.gmk
> @@ -77,6 +77,9 @@
>   
>   $(BUILD_LIBMANAGEMENT_EXT): $(call FindLib, java.base, java)
>   
> +# Include custom extension post hook
> +$(eval $(call IncludeCustomExtension, lib/Lib-jdk.management-post.gmk))
> +
>   TARGETS += $(BUILD_LIBMANAGEMENT_EXT)
>   
>   
> ################################################################################
>
>
>
>
>
>
> Andrew Leonard
> Java Runtimes Development
> IBM Hursley
> IBM United Kingdom Ltd
> Phone internal: 245913, external: 01962 815913
> internet email: andrew_m_leonard at uk.ibm.com
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



More information about the build-dev mailing list