Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: sdk/bin/dart2js.bat

Issue 13812019: Fix arguments to dart2js in windows bat file (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @echo off 1 @echo off
2 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 REM for details. All rights reserved. Use of this source code is governed by a 3 REM for details. All rights reserved. Use of this source code is governed by a
4 REM BSD-style license that can be found in the LICENSE file. 4 REM BSD-style license that can be found in the LICENSE file.
5 5
6 setlocal 6 setlocal
7 rem Handle the case where dart-sdk/bin has been symlinked to. 7 rem Handle the case where dart-sdk/bin has been symlinked to.
8 set DIR_NAME_WITH_SLASH=%~dp0 8 set DIR_NAME_WITH_SLASH=%~dp0
9 set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%% 9 set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
10 call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR 10 call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
11 rem Get rid of surrounding quotes. 11 rem Get rid of surrounding quotes.
12 for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi 12 for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
13 13
14 rem Get absolute full name for SDK_DIR. 14 rem Get absolute full name for SDK_DIR.
15 for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi 15 for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
16 16
17 set DART2JS=%SDK_DIR%lib\_internal\compiler\implementation\dart2js.dart 17 set DART2JS=%SDK_DIR%lib\_internal\compiler\implementation\dart2js.dart
18 set DART=%BIN_DIR%\dart 18 set DART=%BIN_DIR%\dart
19 set SNAPSHOT=%BIN_DIR%\snapshots\utils_wrapper.dart.snapshot 19 set SNAPSHOT=%BIN_DIR%\snapshots\utils_wrapper.dart.snapshot
20 20
21 set EXTRA_OPTIONS= 21 set EXTRA_OPTIONS=
22 set EXTRA_VM_OPTIONS= 22 set EXTRA_VM_OPTIONS=
23 23
24 if _%DART2JS_DEVELOPER_MODE%_ == _1_ ( 24 if _%DART2JS_DEVELOPER_MODE%_ == _1_ (
25 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --checked 25 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --checked
26 ) 26 )
27 27
28 if exist "%SNAPSHOT%" ( 28 if exist "%SNAPSHOT%" (
29 echo Using snapshot "%SNAPSHOT%" >&2 29 echo Using snapshot "%SNAPSHOT%" >&2
30 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --library-root=%SDK_DIR% 30 set EXTRA_OPTIONS=%EXTRA_OPTIONS% --library-root=%SDK_DIR%
ahe 2013/04/11 07:07:01 Quotes around %SDK_DIR%?
31 ) 31 )
32 32
33 rem See comments regarding options below in dart2js shell script. 33 rem See comments regarding options below in dart2js shell script.
34 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --heap_growth_rate=512 34 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --heap_growth_rate=512
35 35
36 if exist "%SNAPSHOT%" ( 36 if exist "%SNAPSHOT%" (
37 "%DART%" %EXTRA_VM_OPTIONS% "SNAPSHOT%" "dart2js" %EXTRA_OPTIONS% %* 37 "%DART%" %EXTRA_VM_OPTIONS% "SNAPSHOT%" "dart2js" %EXTRA_OPTIONS% %*
38 ) else ( 38 ) else (
39 "%DART%" %EXTRA_VM_OPTIONS% "%DART2JS%" %EXTRA_OPTIONS% %* 39 "%DART%" %EXTRA_VM_OPTIONS% "%DART2JS%" %EXTRA_OPTIONS% %*
40 ) 40 )
41 41
42 endlocal 42 endlocal
43 43
44 exit /b %errorlevel% 44 exit /b %errorlevel%
45 45
46 :follow_links 46 :follow_links
47 setlocal 47 setlocal
48 for %%i in (%1) do set result=%%~fi 48 for %%i in (%1) do set result=%%~fi
49 set current= 49 set current=
50 for /f "tokens=2 delims=[]" %%i in ('dir /a:l ^"%~dp1^" 2^>nul ^ 50 for /f "tokens=2 delims=[]" %%i in ('dir /a:l ^"%~dp1^" 2^>nul ^
51 ^| find "> %~n1 ["') do ( 51 ^| find "> %~n1 ["') do (
52 set current=%%i 52 set current=%%i
53 ) 53 )
54 if not "%current%"=="" call :follow_links "%current%", result 54 if not "%current%"=="" call :follow_links "%current%", result
55 endlocal & set %~2=%result% 55 endlocal & set %~2=%result%
56 goto :eof 56 goto :eof
57 57
58 :end 58 :end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698