summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Zeiger <szeiger@novocode.com>2014-03-11 16:05:23 +0100
committerStefan Zeiger <szeiger@novocode.com>2014-03-11 16:05:23 +0100
commit59e8c6e2ba9ab41c7e55f6df8fee2cdae9aad349 (patch)
tree6e9c84c1e2a0ef1dd6510c525c3fea0a16185532
parent7f07d44bcc97ba8435e8c77393554571c9a006ad (diff)
downloadscala-59e8c6e2ba9ab41c7e55f6df8fee2cdae9aad349.tar.gz
scala-59e8c6e2ba9ab41c7e55f6df8fee2cdae9aad349.tar.bz2
scala-59e8c6e2ba9ab41c7e55f6df8fee2cdae9aad349.zip
SI-8368 respect user-supplied -Dscala.usejavacp in Windows runner
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-windows.tmpl9
1 files changed, 8 insertions, 1 deletions
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@ %*