Skip to content

Commit e5a1602

Browse files
committed
Handle promotion based on architecture for all libraries
solves arduino/ArduinoCore-samd#80, which was caused by USBHost library not having a corresponding .h, thus bypassing the findBestLibraryWithHeader check
1 parent 4debb62 commit e5a1602

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ func resolveLibrary(header string, headerToLibraries map[string][]*types.Library
150150
}
151151

152152
if library == nil {
153+
// reorder libraries to promote fully compatible ones
154+
for _, platform := range platforms {
155+
if platform != nil {
156+
libraries = append(librariesCompatibleWithPlatform(libraries, platform), libraries...)
157+
}
158+
}
153159
library = libraries[0]
154160
}
155161

0 commit comments

Comments
 (0)