Skip to content

Commit 89d7d39

Browse files
committed
Add precompiled field to library.properties
A precompiled library should provide: - a header file defining the functions (like a normal library) - some folders named after {build.mcu} containing the precompiled files It should declare - precompiled=true in its library.properties The precompiled files can be either static (.a) or dynamic (.so). In the latter case, the maintainer should take extra care to ensure that the exported symbol versions are matching the remote board's
1 parent 2dbe042 commit 89d7d39

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ const LIBRARY_LICENSE = "license"
137137
const LIBRARY_MAINTAINER = "maintainer"
138138
const LIBRARY_NAME = "name"
139139
const LIBRARY_PARAGRAPH = "paragraph"
140+
const LIBRARY_PRECOMPILED = "precompiled"
140141
const LIBRARY_PROPERTIES = "library.properties"
141142
const LIBRARY_SENTENCE = "sentence"
142143
const LIBRARY_URL = "url"

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

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ func makeNewLibrary(libraryFolder string, debugLevel int, logger i18n.Logger) (*
192192
library.URL = strings.TrimSpace(libProperties[constants.LIBRARY_URL])
193193
library.IsLegacy = false
194194
library.DotALinkage = strings.TrimSpace(libProperties[constants.LIBRARY_DOT_A_LINKAGE]) == "true"
195+
library.Precompiled = strings.TrimSpace(libProperties[constants.LIBRARY_PRECOMPILED]) == "true"
195196
library.Properties = libProperties
196197

197198
return library, nil

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

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ type Library struct {
170170
Name string
171171
Archs []string
172172
DotALinkage bool
173+
Precompiled bool
173174
IsLegacy bool
174175
Version string
175176
Author string

0 commit comments

Comments
 (0)