arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

ldflags only works with precompiled

Open nerdralph opened this issue 5 years ago • 0 comments
trafficstars

Bug Report

library.properties ldflags is ignored unless precompiled=true

Current behavior

After failing to get ldflags to work, I checked the source and found it is only used with precompiled libraries. https://github.com/arduino/arduino-cli/blob/1c7920f40d2d74d74c61e027abd7ea31909bd89d/legacy/builder/phases/libraries_builder.go#L137

Expected behavior

ldflags, when specified, should always get added to the link line.

Environment

arduino-cli.exe Version: 0.10.0 Commit: ec5c3ed Win7e/mingw32

Additional context

I'm writing a bootloader library, and was trying to use the --section-start linker option. While reviewing the code, I also noticed there is an undocumented precompiled=full option for library.properties.

nerdralph avatar Jun 18 '20 15:06 nerdralph