Commit graph

20 commits

Author SHA1 Message Date
Andrew Kelley
17d40ecb49 stage2: building libunwind.a
and put glibc shared objects on the elf linker line
2020-09-16 17:18:13 -07:00
Andrew Kelley
95941c4e70 stage2: building glibc shared objects
* caching system: use 16 bytes siphash final(), there was a bug in the
   std lib that wasn't catching undefined values for 18 bytes. fixed in
   master branch.
 * fix caching system unit test logic to not cause error.TextBusy on windows
 * port the logic from stage1 for building glibc shared objects
 * add is_native_os to the base cache hash
 * fix incorrectly freeing crt_files key (which is always a reference to
   global static constant data)
 * fix 2 use-after-free in loading glibc metadata
 * fix memory leak in buildCRTFile (errdefer instead of defer on arena)
2020-09-16 03:02:46 -07:00
Andrew Kelley
99a2fc2cde stage2: implement .d file parsing for C objects 2020-09-15 18:02:42 -07:00
Andrew Kelley
a0b43ff3b3 stage2: eliminate one failure path in building c object 2020-09-15 15:24:34 -07:00
Andrew Kelley
6e9396e32b integrate target features into building assembly code
This brings us up to par from what stage1 does. There will still be an
open issue for completing this.
2020-09-14 23:03:13 -07:00
Andrew Kelley
1ad60c4386 integrate target features into building C source files 2020-09-14 22:57:08 -07:00
Andrew Kelley
6acd903a95 stage2: support for machine code model CLI 2020-09-14 21:22:11 -07:00
Andrew Kelley
0e94530c51 stage2: refactor 2 CObject fields to use CSourceFile 2020-09-14 19:52:36 -07:00
Andrew Kelley
dffdb2844e track all TODO comments in BRANCH_TODO file
Before merging, do this for every item in the file:
 * solve the issue, or
 * convert the task to a github issue and update the comment
   to link to the issue (and remove "TODO" text from the comment).
Then delete the file.

Related: #363
2020-09-14 18:06:19 -07:00
Andrew Kelley
26798018b7 stage2: implement writing archive files 2020-09-14 15:28:09 -07:00
Andrew Kelley
778bb4bc9c move std.cache_hash from std to stage2
The API is pretty specific to the implementationt details of the
self-hosted compiler. I don't want to have to independently support
and maintain this as part of the standard library, and be obligated
to not make breaking changes to it with changes to the implementation of
stage2.
2020-09-14 11:05:51 -07:00
Andrew Kelley
04f6a26955 fix stage1 regressions in this branch
also prepare for supporting linking into archives
2020-09-14 10:42:29 -07:00
Andrew Kelley
f2e380380e stage2: building glibc Scrt1.o 2020-09-14 00:24:03 -07:00
Andrew Kelley
060c91b97f stage2: namespace cache dir with C source path
This is not strictly necessary but it increases the likelihood of cache
hits because foo.c and bar.c now will have different cache directories
and can be updated independently without clobbering each other's cache
data.
2020-09-13 23:28:28 -07:00
Andrew Kelley
0379d7b431 stage2: don't bother building glibc when only doing build-obj 2020-09-13 23:04:15 -07:00
Andrew Kelley
e5aef96293 stage2: CRT files retain locks on the build artifacts 2020-09-13 22:54:16 -07:00
Andrew Kelley
2627778b25 stage2: don't create empty object files when no zig source 2020-09-13 22:15:03 -07:00
Andrew Kelley
046dce9cef stage2: fix not creating cache o dir before writing to it
also remove non-working debug CLI options
2020-09-13 21:13:24 -07:00
Andrew Kelley
2456df5f4e stage2: rename ZigModule to Module 2020-09-13 19:56:35 -07:00
Andrew Kelley
4d59f77528 stage2: rename Module to Compilation 2020-09-13 19:49:52 -07:00
Renamed from src-self-hosted/Module.zig (Browse further)