Skip to content

Support building static libraries - #1647

Merged
andrewrk merged 7 commits into
masterfrom
static-libs
Oct 9, 2018
Merged

Support building static libraries#1647
andrewrk merged 7 commits into
masterfrom
static-libs

Conversation

@andrewrk

@andrewrk andrewrk commented Oct 9, 2018

Copy link
Copy Markdown
Member

closes #1493
closes #54

  • introduce --disable-pic option which can generally be allowed to be
    the default. compiler_rt.a and builtin.a get this option when you
    build a static executable.
  • compiler_rt and builtin libraries are not built for build-lib
    --static
  • posix_spawn instead of fork/execv
  • disable the error limit on LLD. Fixes the blank lines printed

hello world --release-small on linux x86_64 is now 9.2KiB, statically linked.

 * introduce --disable-pic option which can generally be allowed to be
   the default. compiler_rt.a and builtin.a get this option when you
   build a static executable.
 * compiler_rt and builtin libraries are not built for build-lib
   --static
 * posix_spawn instead of fork/execv
 * disable the error limit on LLD. Fixes the blank lines printed
...whether they will be linked with libc
@andrewrk
andrewrk merged commit 9e38a81 into master Oct 9, 2018
@andrewrk
andrewrk deleted the static-libs branch October 9, 2018 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support building static libraries link builtins in a way that lets unused functions get omitted from final library/binary

1 participant