@@ -14,10 +14,18 @@ import 'package:collection/collection.dart' show MapEquality;
1414// Symbols from the Flutter namespace. These are either of type
1515// "(__DATA,__common)" or "(__DATA,__objc_data)".
1616
17- /// Takes the path to the out directory as argument.
17+ /// Takes the path to the out directory as the first argument, and the path to
18+ /// the buildtools directory as the second argument.
19+ ///
20+ /// If the second argument is not specified, it is assumed that it is the parent
21+ /// of the out directory (for backwards compatibility).
1822void main (List <String > arguments) {
19- assert (arguments.length == 1 );
23+ assert (arguments.length == 2 || arguments.length == 1 );
2024 final String outPath = arguments.first;
25+ final String buildToolsPath = arguments.length == 1
26+ ? p.join (p.dirname (outPath), 'buildtools' )
27+ : arguments[1 ];
28+
2129 String platform;
2230 if (Platform .isLinux) {
2331 platform = 'linux-x64' ;
@@ -26,7 +34,7 @@ void main(List<String> arguments) {
2634 } else {
2735 throw new UnimplementedError ('Script only support running on Linux or MacOS.' );
2836 }
29- final String nmPath = p.join (p. dirname (outPath), 'buildtools' , platform, 'clang' , 'bin' , 'llvm-nm' );
37+ final String nmPath = p.join (buildToolsPath , platform, 'clang' , 'bin' , 'llvm-nm' );
3038 assert (new Directory (outPath).existsSync ());
3139
3240 final Iterable <String > releaseBuilds = new Directory (outPath).listSync ()
0 commit comments