Skip to content

Commit cc0e4c1

Browse files
committed
Skip dependency detection if library is fully precompiled
Precompiled bits of a library should not depend on any link time dependency (we cannot assure ABI stability). Fixes arduino/ArduinoCore-mbed#119
1 parent c30031b commit cc0e4c1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

legacy/builder/container_find_includes.go

+10
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,18 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile t
316316
if library, ok := sourceFile.Origin.(*libraries.Library); ok && library.UtilityDir != nil {
317317
includes = append(includes, library.UtilityDir)
318318
}
319+
320+
if library, ok := sourceFile.Origin.(*libraries.Library); ok {
321+
if library.Precompiled == true && library.PrecompiledWithSources == true {
322+
// Fully precompiled libraries should have no dependencies
323+
// to avoid ABI breakage
324+
return nil
325+
}
326+
}
327+
319328
var preproc_err error
320329
var preproc_stderr []byte
330+
321331
if unchanged && cache.valid {
322332
include = cache.Next().Include
323333
if first && ctx.Verbose {

0 commit comments

Comments
 (0)