# rework the bundle compiler-rt feature · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/ff9798eb265b02d572ecbced675efcd7c763aea9)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: ff9798eb265b02d572ecbced675efcd7c763aea9

Requested commit: ff9798eb265b02d572ecbced675efcd7c763aea9

Commit: ff9798eb265b02d572ecbced675efcd7c763aea9

Tree: a76c48fca7b7458f41c4dca14f9ec9eb30325818

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
rework the bundle compiler-rt feature

 * it is now -fcompiler-rt and -fno-compiler-rt to override the (quite
   reasonable) default of bundling compiler-rt only for executables and
   dynamic libraries.
   - the build.zig API is still called bundle_compiler_rt however it is
     now an optional bool instead of a bool. leaving it as `null` means
     to use the compiler default.
 * renamed some internal identifiers to make the source more readable
 * additionally support -fcompiler-rt when doing build-obj for ELF files
   since that target already supports linking multiple objects into one.
   - includes an error message when attempting this for non-ELF. in the
     future this could additionally be supported with a more advanced
     implementation that does not rely on the linker.
 * properly populate the linker cache hash

```

## Parents

- [2fae28b6afc0e5411c9a9a9def43eeb59fba840f](https://git.cafe/gitcafe/zig/commit/2fae28b6afc0e5411c9a9a9def43eeb59fba840f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/ff9798eb265b02d572ecbced675efcd7c763aea9?format=markdown)
