New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
link builtins in a way that lets unused functions get omitted from final library/binary #54
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Comments
andrewrk
added
the
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
label
Jan 7, 2016
Why have separate memcpy.o and memset.o instead of prebuilding a mem.a and linking with |
That should work too. |
andrewrk
added a commit
that referenced
this issue
May 11, 2016
andrewrk
changed the title
link against memcpy and memset properly
link builtins in a way that lets unused functions get omitted from final library/binary
May 21, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
when linking without libc, build memcpy.o and memset.o. we can cache these objects with a hash of (release/debug, conditional compilation values, target triple/data layout).
generate a compile unit without memcpy/memset exported. when linking the final output, use
ar rcs foo.a foo.o memcpy.o memset.o
. Thenld -o foo foo.a
(or equivalent).This accomplishes several things:
The text was updated successfully, but these errors were encountered: