mirror of https://github.com/noisymime/Arduino.git
Delete core.a when building it fails
This prevents a half-finished core.a file from lingering around. Currently, this should not make a difference since core.a is rebuilt every time, but this prepares for skipping this build step if possible.
This commit is contained in:
parent
57bdacc93c
commit
87c87c2897
|
@ -711,6 +711,7 @@ public class Compiler implements MessageConsumer {
|
||||||
// Delete the .a file, to prevent any previous code from lingering
|
// Delete the .a file, to prevent any previous code from lingering
|
||||||
afile.delete();
|
afile.delete();
|
||||||
|
|
||||||
|
try {
|
||||||
for (File file : coreObjectFiles) {
|
for (File file : coreObjectFiles) {
|
||||||
|
|
||||||
PreferencesMap dict = new PreferencesMap(prefs);
|
PreferencesMap dict = new PreferencesMap(prefs);
|
||||||
|
@ -727,6 +728,10 @@ public class Compiler implements MessageConsumer {
|
||||||
}
|
}
|
||||||
execAsynchronously(cmdArray);
|
execAsynchronously(cmdArray);
|
||||||
}
|
}
|
||||||
|
} catch (RunnerException e) {
|
||||||
|
afile.delete();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
if (variantFolder != null)
|
if (variantFolder != null)
|
||||||
objectFiles.addAll(compileFiles(buildFolder, variantFolder, true,
|
objectFiles.addAll(compileFiles(buildFolder, variantFolder, true,
|
||||||
|
|
Loading…
Reference in New Issue