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

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

Issue 10981070: Second attempt to fix issue 3402. It turns out that we can't use (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 # Setting BIN_DIR this way is ugly, but is needed to handle the case where
107 # dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work
108 # with this case.
109 BIN_DIR="\$(cd "\${0%/*}" ; pwd -P)"
110
107 unset COLORS 111 unset COLORS
108 if test -t 1; then 112 if test -t 1; then
109 # Stdout is a terminal. 113 # Stdout is a terminal.
110 if test 8 -le `tput colors`; then 114 if test 8 -le `tput colors`; then
111 # Stdout has at least 8 colors, so enable colors. 115 # Stdout has at least 8 colors, so enable colors.
112 COLORS="--enable-diagnostic-colors" 116 COLORS="--enable-diagnostic-colors"
113 fi 117 fi
114 fi 118 fi
115 exec \$BIN_DIR/dart$options \$BIN_DIR/$path \$COLORS "\$@" 119 exec "\$BIN_DIR"/dart$options "\$BIN_DIR/$path" \$COLORS "\$@"
116 ''', 120 ''',
117 ''' 121 '''
118 @echo off 122 @echo off
119 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 123 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 124 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. 125 REM BSD-style license that can be found in the LICENSE file.
122 126
123 set SCRIPTPATH=%~dp0 127 set SCRIPTPATH=%~dp0
124 128
125 REM Does the path have a trailing slash? If so, remove it. 129 REM Does the path have a trailing slash? If so, remove it.
126 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% 130 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
127 131
128 set arguments=%* 132 set arguments=%*
129 133
130 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% 134 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments%
131 '''.replaceAll('\n', '\r\n')]; 135 '''.replaceAll('\n', '\r\n')];
132 } 136 }
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