Index: sdk/bin/dartanalyzer.bat |
diff --git a/sdk/bin/dartanalyzer.bat b/sdk/bin/dartanalyzer.bat |
index bca4afbf4474a23a3fbb47a8e58f33533a6911c4..f9b66c2dc3686c70e3caeeaf5f77502984208659 100644 |
--- a/sdk/bin/dartanalyzer.bat |
+++ b/sdk/bin/dartanalyzer.bat |
@@ -12,7 +12,6 @@ rem Get rid of surrounding quotes. |
for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi |
set DART=%BIN_DIR%\dart |
-set SNAPSHOT=%BIN_DIR%\snapshots\dartanalyzer.dart.snapshot |
rem Get absolute full name for SDK_DIR. |
for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi |
@@ -22,7 +21,33 @@ if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1% |
set SDK_ARG=--dart-sdk=%SDK_DIR% |
-"%DART%" "%SNAPSHOT%" "%SDK_ARG%" %* |
+set EXTRA_VM_OPTIONS= |
+ |
+if _%DARTANALYZER_DEVELOPER_MODE%_ == _1_ ( |
+ set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --checked |
+) |
+ |
+rem We allow extra vm options to be passed in through an environment variable. |
+if not "_%DART_VM_OPTIONS%_" == "__" ( |
+ set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% %DART_VM_OPTIONS% |
+) |
+ |
+rem Get absolute full name for DART_ROOT. |
+for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi |
+ |
+rem Remove trailing backslash if there is one |
+if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1% |
+ |
+set ANALYZER=%DART_ROOT%\pkg\analyzer\bin\analyzer.dart |
+ |
+rem DART_CONFIGURATION defaults to ReleaseIA32 |
+if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseIA32 |
+ |
+set BUILD_DIR=%DART_ROOT%\build\%DART_CONFIGURATION% |
+ |
+set PACKAGE_ROOT=%BUILD_DIR%\packages\ |
Johnni Winther
2014/10/16 11:42:36
Remove the trailing slash since in creates an esca
Paul Berry
2014/10/16 14:16:30
Done.
|
+ |
+"%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "%ANALYZER%" "%SDK_ARG%" %* |
endlocal |