Andrew Kelley 7c25390c95 support -fcompiler-rt in conjunction with build-obj
When using `build-exe` or `build-lib -dynamic`, `-fcompiler-rt` means building
compiler-rt into a static library and then linking it into the executable.

When using `build-lib`, `-fcompiler-rt` means building compiler-rt into an
object file and then adding it into the static archive.

Before this commit, when using `build-obj`, zig would build compiler-rt
into an object file, and then on ELF, use `lld -r` to merge it into the
main object file. Other linker backends of LLD do not support `-r` to
merge objects, so this failed with error messages for those targets.

Now, `-fcompiler-rt` when used with `build-obj` acts as if the user puts
`_ = @import("compiler_rt");` inside their root source file. The symbols
of compiler-rt go into the same compilation unit as the root source file.

This is hooked up for stage1 only for now. Once stage2 is capable of
building compiler-rt, it should be hooked up there as well.
2021-07-22 19:51:32 -07:00
..
2021-07-20 12:19:17 -07:00
2021-06-15 11:50:13 +09:00
2021-07-08 14:10:49 -07:00
2021-06-21 17:03:03 -07:00
2020-09-21 18:38:55 -07:00
2018-10-27 11:35:01 -04:00
2020-12-16 12:18:14 +01:00