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

Side by Side Diff: utils/compiler/build_helper.dart

Issue 10985068: Fix issue 3402 . The initial suggestion of using readlink doesn't (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #import('dart:io'); 5 #import('dart:io');
6 #import('dart:uri'); 6 #import('dart:uri');
7 7
8 #import('../../lib/compiler/implementation/util/uri_extras.dart'); 8 #import('../../lib/compiler/implementation/util/uri_extras.dart');
9 #import('../../lib/compiler/implementation/filenames.dart'); 9 #import('../../lib/compiler/implementation/filenames.dart');
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 print('${name}PathWin = $pathWin'); 91 print('${name}PathWin = $pathWin');
92 92
93 // Tell the VM to grow the heap more aggressively. This should only 93 // Tell the VM to grow the heap more aggressively. This should only
94 // be necessary temporarily until the VM is better at detecting how 94 // be necessary temporarily until the VM is better at detecting how
95 // applications use memory. 95 // applications use memory.
96 // TODO(ahe): Remove this option. 96 // TODO(ahe): Remove this option.
97 options = ' --heap_growth_rate=32$options'; 97 options = ' --heap_growth_rate=32$options';
98 98
99 return [ 99 return [
100 ''' 100 '''
101 #!/bin/sh 101 #!/bin/bash
102 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 102 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
103 # for details. All rights reserved. Use of this source code is governed by a 103 # for details. All rights reserved. Use of this source code is governed by a
104 # BSD-style license that can be found in the LICENSE file. 104 # BSD-style license that can be found in the LICENSE file.
105 105
106 BIN_DIR=`dirname \$0` 106 # The following line MUST be the first command in the script.
107 ABS_SCRIPT_PATH="\$_"
108
109 # Setting BIN_DIR this way is ugly, but is needed to handle the case where
110 # dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work
111 # with this case.
112 BIN_DIR="\$(cd "\${ABS_SCRIPT_PATH%/*}" ; pwd -P)"
113
107 unset COLORS 114 unset COLORS
108 if test -t 1; then 115 if test -t 1; then
109 # Stdout is a terminal. 116 # Stdout is a terminal.
110 if test 8 -le `tput colors`; then 117 if test 8 -le `tput colors`; then
111 # Stdout has at least 8 colors, so enable colors. 118 # Stdout has at least 8 colors, so enable colors.
112 COLORS="--enable-diagnostic-colors" 119 COLORS="--enable-diagnostic-colors"
113 fi 120 fi
114 fi 121 fi
115 exec \$BIN_DIR/dart$options \$BIN_DIR/$path \$COLORS "\$@" 122 exec "\$BIN_DIR"/dart$options "\$BIN_DIR/$path" \$COLORS "\$@"
116 ''', 123 ''',
117 ''' 124 '''
118 @echo off 125 @echo off
119 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 126 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
120 REM for details. All rights reserved. Use of this source code is governed by a 127 REM for details. All rights reserved. Use of this source code is governed by a
121 REM BSD-style license that can be found in the LICENSE file. 128 REM BSD-style license that can be found in the LICENSE file.
122 129
123 set SCRIPTPATH=%~dp0 130 set SCRIPTPATH=%~dp0
124 131
125 REM Does the path have a trailing slash? If so, remove it. 132 REM Does the path have a trailing slash? If so, remove it.
126 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% 133 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
127 134
128 set arguments=%* 135 set arguments=%*
129 136
130 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% 137 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments%
131 '''.replaceAll('\n', '\r\n')]; 138 '''.replaceAll('\n', '\r\n')];
132 } 139 }
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