@@ -19,7 +19,6 @@ import (
19
19
"strings"
20
20
"time"
21
21
22
- "github.com/arduino/arduino-cli/arduino/builder/compilation"
23
22
"github.com/arduino/arduino-cli/arduino/builder/cpp"
24
23
"github.com/arduino/arduino-cli/arduino/builder/utils"
25
24
"github.com/arduino/arduino-cli/arduino/cores"
@@ -38,19 +37,15 @@ var (
38
37
)
39
38
40
39
// BuildLibraries fixdoc
41
- func (b * Builder ) BuildLibraries (
42
- includesFolders paths.PathList ,
43
- importedLibraries libraries.List ,
44
- compilationDatabase * compilation.Database ,
45
- ) (paths.PathList , error ) {
40
+ func (b * Builder ) BuildLibraries (includesFolders paths.PathList , importedLibraries libraries.List ) (paths.PathList , error ) {
46
41
includes := f .Map (includesFolders .AsStrings (), cpp .WrapWithHyphenI )
47
42
libs := importedLibraries
48
43
49
44
if err := b .librariesBuildPath .MkdirAll (); err != nil {
50
45
return nil , errors .WithStack (err )
51
46
}
52
47
53
- librariesObjectFiles , err := b .compileLibraries (libs , includes , compilationDatabase )
48
+ librariesObjectFiles , err := b .compileLibraries (libs , includes )
54
49
if err != nil {
55
50
return nil , errors .WithStack (err )
56
51
}
@@ -117,16 +112,13 @@ func (b *Builder) findExpectedPrecompiledLibFolder(
117
112
return nil
118
113
}
119
114
120
- func (b * Builder ) compileLibraries (libraries libraries.List , includes []string , compilationDatabase * compilation. Database ) (paths.PathList , error ) {
115
+ func (b * Builder ) compileLibraries (libraries libraries.List , includes []string ) (paths.PathList , error ) {
121
116
b .Progress .AddSubSteps (len (libraries ))
122
117
defer b .Progress .RemoveSubSteps ()
123
118
124
119
objectFiles := paths .NewPathList ()
125
120
for _ , library := range libraries {
126
- libraryObjectFiles , err := b .compileLibrary (
127
- library , includes ,
128
- compilationDatabase ,
129
- )
121
+ libraryObjectFiles , err := b .compileLibrary (library , includes )
130
122
if err != nil {
131
123
return nil , errors .WithStack (err )
132
124
}
@@ -139,10 +131,7 @@ func (b *Builder) compileLibraries(libraries libraries.List, includes []string,
139
131
return objectFiles , nil
140
132
}
141
133
142
- func (b * Builder ) compileLibrary (
143
- library * libraries.Library , includes []string ,
144
- compilationDatabase * compilation.Database ,
145
- ) (paths.PathList , error ) {
134
+ func (b * Builder ) compileLibrary (library * libraries.Library , includes []string ) (paths.PathList , error ) {
146
135
if b .logger .Verbose () {
147
136
b .logger .Info (tr (`Compiling library "%[1]s"` , library .Name ))
148
137
}
@@ -205,7 +194,7 @@ func (b *Builder) compileLibrary(
205
194
libObjectFiles , err := utils .CompileFilesRecursive (
206
195
library .SourceDir , libraryBuildPath , b .buildProperties , includes ,
207
196
b .onlyUpdateCompilationDatabase ,
208
- compilationDatabase ,
197
+ b . compilationDatabase ,
209
198
b .jobs ,
210
199
b .logger ,
211
200
b .Progress ,
@@ -236,7 +225,7 @@ func (b *Builder) compileLibrary(
236
225
libObjectFiles , err := utils .CompileFiles (
237
226
library .SourceDir , libraryBuildPath , b .buildProperties , includes ,
238
227
b .onlyUpdateCompilationDatabase ,
239
- compilationDatabase ,
228
+ b . compilationDatabase ,
240
229
b .jobs ,
241
230
b .logger ,
242
231
b .Progress ,
@@ -251,7 +240,7 @@ func (b *Builder) compileLibrary(
251
240
utilityObjectFiles , err := utils .CompileFiles (
252
241
library .UtilityDir , utilityBuildPath , b .buildProperties , includes ,
253
242
b .onlyUpdateCompilationDatabase ,
254
- compilationDatabase ,
243
+ b . compilationDatabase ,
255
244
b .jobs ,
256
245
b .logger ,
257
246
b .Progress ,
0 commit comments