From 59e8c6e2ba9ab41c7e55f6df8fee2cdae9aad349 Mon Sep 17 00:00:00 2001 From: Stefan Zeiger Date: Tue, 11 Mar 2014 16:05:23 +0100 Subject: SI-8368 respect user-supplied -Dscala.usejavacp in Windows runner --- src/compiler/scala/tools/ant/templates/tool-windows.tmpl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl index 8441f3af23..9a2deb4da6 100644 --- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl +++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl @@ -25,6 +25,10 @@ shift :notoolcp +rem SI-8358, SI-8368 -- the default should really be false, +rem but I don't want to flip the default during 2.11's RC cycle +set _OVERRIDE_USEJAVACP="-Dscala.usejavacp=true" + rem We keep in _JAVA_PARAMS all -J-prefixed and -D-prefixed arguments set _JAVA_PARAMS= @@ -45,6 +49,9 @@ if "%_TEST_PARAM:~0,2%"=="-J" ( ) if "%_TEST_PARAM:~0,2%"=="-D" ( + if "%_TEST_PARAM%"=="-Dscala.usejavacp" ( + set _OVERRIDE_USEJAVACP= + ) rem test if this was double-quoted property "-Dprop=42" for /F "delims== tokens=1-2" %%G in ("%_TEST_PARAM%") DO ( if not "%%G" == "%_TEST_PARAM%" ( @@ -126,7 +133,7 @@ if "%_TOOL_CLASSPATH%"=="" ( if not "%_LINE_TOOLCP%"=="" call :add_cpath "%_LINE_TOOLCP%" -set _PROPS=-Dscala.home="!_SCALA_HOME!" -Denv.emacs="%EMACS%" -Dscala.usejavacp=true @properties@ +set _PROPS=-Dscala.home="!_SCALA_HOME!" -Denv.emacs="%EMACS%" %_OVERRIDE_USEJAVACP% @properties@ rem echo "%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %* "%_JAVACMD%" %_JAVA_OPTS% %_PROPS% -cp "%_TOOL_CLASSPATH%" @class@ @toolflags@ %* -- cgit v1.2.3