diff -r 0de8011890c0 -r d9325138bac6 jdk/make/launcher/LauncherCommon.gmk --- a/jdk/make/launcher/LauncherCommon.gmk Fri Jun 09 16:26:32 2017 +0100 +++ b/jdk/make/launcher/LauncherCommon.gmk Fri Jun 09 09:54:59 2017 -0700 @@ -66,7 +66,10 @@ # MAIN_MODULE The module of the main class to launch if different from the # current module # MAIN_CLASS The Java main class to launch -# JAVA_ARGS Processed into a -DJAVA_ARGS C flag +# JAVA_ARGS Processed into a -DJAVA_ARGS and added to CFLAGS +# EXTRA_JAVA_ARGS Processed into a -DEXTRA_JAVA_ARGS and is prepended +# before JAVA_ARGS to CFLAGS, primarily to allow long string literal +# compile time defines exceeding Visual Studio 2013 limitations. # CFLAGS Additional CFLAGS # CFLAGS_windows Additional CFLAGS_windows # LIBS_unix Additional LIBS_unix @@ -104,6 +107,11 @@ endif ifneq ($$($1_JAVA_ARGS), ) + ifneq ($$($1_EXTRA_JAVA_ARGS), ) + $1_EXTRA_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \ + $$(addprefix -J, $$($1_EXTRA_JAVA_ARGS)), "$$a"$(COMMA) )) }' + $1_CFLAGS += -DEXTRA_JAVA_ARGS=$$($1_EXTRA_JAVA_ARGS_STR) + endif $1_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \ $$(addprefix -J, $$($1_JAVA_ARGS)) -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS), "$$a"$(COMMA) )) }' $1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)