Skip to content

Commit 99c646b

Browse files
authored
Document library.properties precompiled field's "full" option (#829)
Previously, the precompiled field of library.properties only supported one value: "true". As it became apparent that there were two distinct use cases for this feature, it was necessary to add a new option so that both use cases could be fully supported.
1 parent c95810c commit 99c646b

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Diff for: docs/library-specification.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,20 @@ otherwise below, **all fields are required**. The available fields are:
8282
- **includes** - **(available from Arduino IDE 1.6.10)** (optional) a comma separated list of files to be added to the
8383
sketch as `#include <...>` lines. This property is used with the "Include library" command in the Arduino IDE. If the
8484
`includes` property is missing, all the header files (.h) on the root source folder are included.
85-
- **precompiled** - **(available from Arduino IDE 1.8.6/arduino-builder 1.4.0)** (optional) set to `true` to allow the
86-
use of .a (archive) and .so (shared object) files. The .a/.so file must be located at `src/{build.mcu}` where
87-
`{build.mcu}` is the architecture name of the target the file was compiled for. Ex: `cortex-m3` for the Arduino DUE.
88-
The static library should be linked as an ldflag.
85+
- **precompiled** - **(available from Arduino IDE 1.8.6/arduino-builder 1.4.0)** (optional) enables support for .a
86+
(archive) and .so (shared object) files. The .a/.so file must be located at `src/{build.mcu}` where `{build.mcu}` is
87+
the architecture name of the target the file was compiled for. Ex: `cortex-m3` for the Arduino DUE. The static library
88+
should be linked as an ldflag. The **precompiled** field has two supported values, which control how any source files
89+
in the library are handled:
90+
- true - Source files are always compiled. This is useful for "mixed" libraries, such as those that contain both open
91+
source code and the precompiled binary of a closed source component. Support for "mixed" libraries was inadvertently
92+
lost in Arduino IDE 1.8.12/arduino-builder 1.5.2/Arduino CLI 0.8.0, and returned in Arduino IDE
93+
1.8.13/arduino-builder 1.5.3/Arduino CLI 0.11.0.
94+
- full - **(available from Arduino IDE 1.8.13/arduino-builder 1.5.3/Arduino CLI 0.11.0)** If the library provides a
95+
precompiled library for the board being compiled for, the source files will not be compiled. If no precompiled
96+
library was provided for the selected board, source files are compiled as a fallback. This is useful for
97+
precompiling the library to reduce compilation time for specific target hardware, but also providing support for
98+
arbitrary boards by compiling the library on demand.
8999
- **ldflags** - **(available from Arduino IDE 1.8.6/arduino-builder 1.4.0)** (optional) the linker flags to be added.
90100
Ex: `ldflags=-lm`
91101

0 commit comments

Comments
 (0)