@@ -100,12 +100,12 @@ class CBuilder extends CTool implements Builder {
100
100
super .optimizationLevel = OptimizationLevel .o3,
101
101
this .buildMode = BuildMode .release,
102
102
}) : super (
103
- type: OutputType .executable,
104
- assetName: null ,
105
- installName: null ,
106
- pic: pie,
107
- linkModePreference: null ,
108
- );
103
+ type: OutputType .executable,
104
+ assetName: null ,
105
+ installName: null ,
106
+ pic: pie,
107
+ linkModePreference: null ,
108
+ );
109
109
110
110
/// Runs the C Compiler with on this C build spec.
111
111
///
@@ -118,8 +118,10 @@ class CBuilder extends CTool implements Builder {
118
118
String ? linkInPackage,
119
119
}) async {
120
120
if (! input.config.buildCodeAssets) {
121
- logger? .info ('buildAssetTypes did not contain "${CodeAsset .type }", '
122
- 'skipping CodeAsset $assetName build.' );
121
+ logger? .info (
122
+ 'buildAssetTypes did not contain "${CodeAsset .type }", '
123
+ 'skipping CodeAsset $assetName build.' ,
124
+ );
123
125
return ;
124
126
}
125
127
assert (
@@ -130,12 +132,15 @@ class CBuilder extends CTool implements Builder {
130
132
final outDir = input.outputDirectory;
131
133
final packageRoot = input.packageRoot;
132
134
await Directory .fromUri (outDir).create (recursive: true );
133
- final linkMode =
134
- getLinkMode (linkModePreference ?? input.config.code.linkModePreference);
135
- final libUri = outDir
136
- .resolve (input.config.code.targetOS.libraryFileName (name, linkMode));
137
- final exeUri =
138
- outDir.resolve (input.config.code.targetOS.executableFileName (name));
135
+ final linkMode = getLinkMode (
136
+ linkModePreference ?? input.config.code.linkModePreference,
137
+ );
138
+ final libUri = outDir.resolve (
139
+ input.config.code.targetOS.libraryFileName (name, linkMode),
140
+ );
141
+ final exeUri = outDir.resolve (
142
+ input.config.code.targetOS.executableFileName (name),
143
+ );
139
144
final sources = [
140
145
for (final source in this .sources)
141
146
packageRoot.resolveUri (Uri .file (source)),
@@ -167,9 +172,10 @@ class CBuilder extends CTool implements Builder {
167
172
type == OutputType .library && linkMode == DynamicLoadingBundled ()
168
173
? libUri
169
174
: null ,
170
- staticLibrary: type == OutputType .library && linkMode == StaticLinking ()
171
- ? libUri
172
- : null ,
175
+ staticLibrary:
176
+ type == OutputType .library && linkMode == StaticLinking ()
177
+ ? libUri
178
+ : null ,
173
179
executable: type == OutputType .executable ? exeUri : null ,
174
180
// ignore: invalid_use_of_visible_for_testing_member
175
181
installName: installName,
@@ -205,14 +211,15 @@ class CBuilder extends CTool implements Builder {
205
211
}
206
212
// ignore: deprecated_member_use
207
213
if (! input.config.dryRun) {
208
- final includeFiles = await Stream .fromIterable (includes)
209
- .asyncExpand (
210
- (include) => Directory (include.toFilePath ())
211
- .list (recursive: true )
212
- .where ((entry) => entry is File )
213
- .map ((file) => file.uri),
214
- )
215
- .toList ();
214
+ final includeFiles =
215
+ await Stream .fromIterable (includes)
216
+ .asyncExpand (
217
+ (include) => Directory (include.toFilePath ())
218
+ .list (recursive: true )
219
+ .where ((entry) => entry is File )
220
+ .map ((file) => file.uri),
221
+ )
222
+ .toList ();
216
223
217
224
output.addDependencies ({
218
225
// Note: We use a Set here to deduplicate the dependencies.
0 commit comments