Skip to content

Bare template crashes during release build with lto = 'fat' in nightly #71

Closed
@skrb-io

Description

@skrb-io

Building the rp2040 project template without any alterations with rust nightly results in an error caused by lto = 'fat' optimization

~/Documents/Projects/rp2040-nightly (main) $ cargo build --release
   Compiling rp2040-nightly v0.1.0 (/home/--/Documents/Projects/rp2040-nightly)
warning: Linking globals named '__addsf3': symbol multiply defined!

error: failed to load bitcode of module "rp2040_hal-33611457b63b1605.rp2040_hal.80f0522449fd3a4f-cgu.0.rcgu.o": 

warning: `rp2040-nightly` (bin "rp2040-nightly") generated 1 warning
error: could not compile `rp2040-nightly` (bin "rp2040-nightly") due to previous error; 1 warning emitted

It is possible that I am missing something, but changing lto = 'thin' seems to solve the issue albeit resulting in a larger binary size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions