@@ -186,19 +186,28 @@ public boolean compile(Sketch sketch,
186
186
includePaths .remove (includePaths .size () - 1 );
187
187
}
188
188
189
- // 3. compile the core, outputting .o files to <buildPath> and then
190
- // collecting them into the core.a library file.
191
-
192
- sketch .setCompilingProgress (50 );
193
- includePaths .clear ();
194
- includePaths .add (corePath ); // include path for core only
195
- if (variantPath != null ) includePaths .add (variantPath );
196
- List <File > coreObjectFiles =
197
- compileFiles (avrBasePath , buildPath , includePaths ,
198
- findFilesInPath (corePath , "S" , true ),
199
- findFilesInPath (corePath , "c" , true ),
200
- findFilesInPath (corePath , "cpp" , true ),
201
- boardPreferences );
189
+ // 3. compile the core, outputting .o files to <buildPath> and then
190
+ // collecting them into the core.a library file.
191
+
192
+ sketch .setCompilingProgress (50 );
193
+ includePaths .clear ();
194
+ includePaths .add (corePath ); // include path for core only
195
+ if (variantPath != null )
196
+ includePaths .add (variantPath );
197
+ List <File > coreObjectFiles = compileFiles ( //
198
+ avrBasePath , buildPath , includePaths , //
199
+ findFilesInPath (corePath , "S" , true ), //
200
+ findFilesInPath (corePath , "c" , true ), //
201
+ findFilesInPath (corePath , "cpp" , true ), //
202
+ boardPreferences );
203
+
204
+ if (variantPath != null )
205
+ objectFiles .addAll (compileFiles ( //
206
+ avrBasePath , buildPath , includePaths , //
207
+ findFilesInPath (variantPath , "S" , true ), //
208
+ findFilesInPath (variantPath , "c" , true ), //
209
+ findFilesInPath (variantPath , "cpp" , true ), //
210
+ boardPreferences ));
202
211
203
212
String runtimeLibraryName = buildPath + File .separator + "core.a" ;
204
213
List baseCommandAR = new ArrayList (Arrays .asList (new String [] {
0 commit comments