Skip to content

figure out why unused functions from builtin.a are not getting omitted from final binary #2062

@andrewrk

Description

@andrewrk

I'm pretty sure when I solved #54 it was working but now if I do this:

$ ./zig build-exe ../examples/hello_world/hello.zig --release-small
$ objdump -d hello
...
0000000000201a40 <sqrt>:
...
0000000000201bf0 <sqrtf>:
...

That's not supposed to be in there. sqrt (among others) isn't called from this application.

On the other hand functions from compiler_rt.a are correctly getting omitted.

Maybe we should do -ffunction-sections?

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions