14 Commits

Author SHA1 Message Date
Andrew Kelley
5440ca8eb7 --main-pkg-path properly resolves the relative root src file path 2020-09-24 22:15:40 -07:00
Andrew Kelley
054fafd7d9 stage2: implement @cImport
Also rename Cache.CacheHash to Cache.Manifest
2020-09-24 16:22:45 -07:00
Andrew Kelley
1123c90987 stage2: print the test command after it fails 2020-09-23 23:13:18 -07:00
Andrew Kelley
7bbd152dcc nobody likes my std.process.cleanExit idea
it's appropriate for the self-hosted compiler though, so this commit
moves it from std lib to stage2 src code.
2020-09-23 20:52:33 -07:00
Andrew Kelley
90b320d0e9 use ascii range for the --watch REPL prompt 2020-09-23 14:50:52 -07:00
Andrew Kelley
02886a8b93 stage2: support rpaths 2020-09-23 11:01:15 -07:00
Andrew Kelley
c0b774fbc6 stage2: support passing extra C flags to C source files
closes #3508
2020-09-23 10:22:44 -07:00
Andrew Kelley
d03fcc73fc stage2: implement --main-pkg-path 2020-09-23 09:56:30 -07:00
Andrew Kelley
0638a020cf stage2: implement --pkg-begin and --pkg-end CLI args 2020-09-22 23:00:33 -07:00
Andrew Kelley
c2b1cd7c45 stage2: implement zig build
As part of this:

 * add std.process.cleanExit. closes #6395
   - use it in several places
 * adjust the alignment of text in `zig build --help` menu
 * Cache: support the concept of "unhit" so that we properly keep track
   of the cache when we find out using the secondary hash that the cache
   "hit" was actually a miss. Use this to fix false negatives of caching
   of stage1 build artifacts.
 * fix not deleting the symlink hash for stage1 build artifacts causing
   false positives.
 * implement support for Package arguments in stage1 build artifacts
 * update and add missing usage text
 * add --override-lib-dir and --enable-cache CLI options
   - `--enable-cache` takes the place of `--cache on`
 * CLI supports -femit-bin=foo combined with --enable-cache to do an
   "update file" operation. --enable-cache without that argument
   will build the output into a cache directory and then print the path
   to stdout (matching master branch behavior).
 * errors surfacing from main() now print "error: Foo" instead of
   "error: error.Foo".
2020-09-22 22:18:19 -07:00
Andrew Kelley
dacd36ca9b stage2: implement using the global cache dir 2020-09-22 14:08:08 -07:00
Andrew Kelley
bf9a16a037 stage2: implement zig init-lib and zig init-exe 2020-09-21 23:28:34 -07:00
Andrew Kelley
ead50ea665 stage2: implement zig run and zig test 2020-09-21 21:01:04 -07:00
Andrew Kelley
528832bd3a rename src-self-hosted/ to src/ 2020-09-21 18:38:55 -07:00