Skip to content

Commit 3a4c024

Browse files
committed
Move sizer after PrintUsedLibraries
Signed-off-by: Martino Facchin <[email protected]>
1 parent 65aa1e6 commit 3a4c024

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Diff for: src/arduino.cc/builder/builder.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ func (s *Builder) Run(ctx *types.Context) error {
116116
&RecipeByPrefixSuffixRunner{Prefix: "recipe.objcopy.", Suffix: constants.HOOKS_PATTERN_SUFFIX},
117117
&RecipeByPrefixSuffixRunner{Prefix: constants.HOOKS_OBJCOPY_POSTOBJCOPY, Suffix: constants.HOOKS_PATTERN_SUFFIX},
118118

119-
&phases.Sizer{},
120-
121119
&MergeSketchWithBootloader{},
122120

123121
&RecipeByPrefixSuffixRunner{Prefix: constants.HOOKS_POSTBUILD, Suffix: constants.HOOKS_PATTERN_SUFFIX},
@@ -129,6 +127,8 @@ func (s *Builder) Run(ctx *types.Context) error {
129127
&PrintUsedAndNotUsedLibraries{SketchError: mainErr != nil},
130128

131129
&PrintUsedLibrariesIfVerbose{},
130+
131+
&phases.Sizer{SketchError: mainErr != nil},
132132
}
133133
otherErr := runCommands(ctx, commands, false)
134134

Diff for: src/arduino.cc/builder/phases/sizer.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,16 @@ import (
4141
"arduino.cc/properties"
4242
)
4343

44-
type Sizer struct{}
44+
type Sizer struct {
45+
SketchError bool
46+
}
4547

4648
func (s *Sizer) Run(ctx *types.Context) error {
49+
50+
if s.SketchError {
51+
return nil
52+
}
53+
4754
buildProperties := ctx.BuildProperties
4855
verbose := ctx.Verbose
4956
warningsLevel := ctx.WarningsLevel

0 commit comments

Comments
 (0)