|
2 | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | 3 | // found in the LICENSE file. |
4 | 4 |
|
5 | | -import 'dart:io' as io show Directory; |
6 | | - |
7 | 5 | import 'package:engine_build_configs/engine_build_configs.dart'; |
8 | | -import 'package:path/path.dart' as p; |
9 | 6 |
|
10 | 7 | import 'environment.dart'; |
11 | 8 | import 'logger.dart'; |
@@ -122,18 +119,12 @@ String demangleConfigName(Environment env, String name) { |
122 | 119 | Future<int> runBuild( |
123 | 120 | Environment environment, |
124 | 121 | Build build, { |
| 122 | + required bool enableRbe, |
125 | 123 | List<String> extraGnArgs = const <String>[], |
126 | 124 | List<String> targets = const <String>[], |
127 | 125 | }) async { |
128 | | - // If RBE config files aren't in the tree, then disable RBE. |
129 | | - final String rbeConfigPath = p.join( |
130 | | - environment.engine.srcDir.path, |
131 | | - 'flutter', |
132 | | - 'build', |
133 | | - 'rbe', |
134 | | - ); |
135 | 126 | final List<String> gnArgs = <String>[ |
136 | | - if (!io.Directory(rbeConfigPath).existsSync()) '--no-rbe', |
| 127 | + if (!enableRbe) '--no-rbe', |
137 | 128 | ...extraGnArgs, |
138 | 129 | ]; |
139 | 130 |
|
@@ -192,16 +183,10 @@ Future<int> runGn( |
192 | 183 | Environment environment, |
193 | 184 | Build build, { |
194 | 185 | List<String> extraGnArgs = const <String>[], |
| 186 | + required bool enableRbe, |
195 | 187 | }) async { |
196 | | - // If RBE config files aren't in the tree, then disable RBE. |
197 | | - final String rbeConfigPath = p.join( |
198 | | - environment.engine.srcDir.path, |
199 | | - 'flutter', |
200 | | - 'build', |
201 | | - 'rbe', |
202 | | - ); |
203 | 188 | final List<String> gnArgs = <String>[ |
204 | | - if (!io.Directory(rbeConfigPath).existsSync()) '--no-rbe', |
| 189 | + if (!enableRbe) '--no-rbe', |
205 | 190 | ...extraGnArgs, |
206 | 191 | ]; |
207 | 192 |
|
|
0 commit comments