Commit Graph

2399 Commits

Author SHA1 Message Date
Andrew Kelley 85d0f0d45b fix @setRuntimeSafety not able to override release modes 2019-03-13 14:46:53 -04:00
Andrew Kelley d495dcc3c9 zig test respects --output-dir parameter 2019-03-13 12:35:10 -04:00
LemonBoy 49838a9f3e Fix generation of comptime slices
By erasing the global_refs field we'd trip any codepath using
const_values_equal_ptr to figure if two slices were different.
2019-03-13 11:35:05 -04:00
emekoi 1ed38a682e added z3 and fixed dynamic linker on mingw 2019-03-13 10:37:53 -04:00
Andrew Kelley cf699ee068 don't resolve dynamic linker for static executables 2019-03-12 18:28:32 -04:00
Andrew Kelley 9741b2aab4 avoid a string that is too long for msvc 2019-03-12 18:09:40 -04:00
Andrew Kelley 62486c35a4 ability to build musl from source
bundles musl 1.1.21

See #514
2019-03-12 17:32:32 -04:00
Andrew Kelley 5734b7a37a building musl start files from source 2019-03-12 13:18:52 -04:00
Andrew Kelley 80e5af2be2 Merge pull request #2049 from ziglang/problematic-mtime-detection
stage1 caching system: detect problematic mtimes
2019-03-11 12:47:55 -04:00
Andrew Kelley 1d5e349a52 ir: fix handling of OnePossibleValueInvalid
this is the poison value which means a compile error has
already been reported
2019-03-11 11:09:15 -04:00
Jimmi HC bcbb2650c5 check for type_has_one_possible_value and added correct caching to TypeInfo 2019-03-11 10:55:43 -04:00
Jimmi Holst Christensen 2d7f0ca387 fixed enum to union code 2019-03-11 10:55:10 -04:00
Jimmi Holst Christensen 5a52613caf use cached const_void_val 2019-03-11 10:55:10 -04:00
Jimmi Holst Christensen 29accac74c removed wild tab 2019-03-11 10:55:10 -04:00
Jimmi Holst Christensen 8eedec4f93 fixed #1600 2019-03-11 10:55:04 -04:00
Andrew Kelley 895fab156a fix build on windows 2019-03-11 10:35:04 -04:00
Andrew Kelley 3a6f19de48 stage1 caching system: detect problematic mtimes
closes #2045
2019-03-11 10:26:08 -04:00
Andrew Kelley fec4555476 fix inconsistent type information of optional C pointers
solves an assertion failure in LLVM
2019-03-10 18:02:59 -04:00
Sahnvour fa9fcab620 translate-c: add support for integer suffixes on 0 (zero) litteral inside macro definitions 2019-03-10 14:56:35 -04:00
Andrew Kelley 8624379c71 Merge pull request #2038 from ziglang/caching
breaking changes to zig build API and improved caching
2019-03-09 01:17:36 -05:00
Andrew Kelley 94e52dba85 fix docgen and fix unnecessarily adding .root suffix to objects 2019-03-09 01:00:45 -05:00
Andrew Kelley 85d23e68ee fix .d file parsing and string literal ast rendering 2019-03-08 23:40:39 -05:00
Andrew Kelley 91955dee58 breaking changes to zig build API and improved caching
* in Zig build scripts, getOutputPath() is no longer a valid function
   to call, unless setOutputDir() was used, or within a custom make()
   function. Instead there is more convenient API to use which takes
   advantage of the caching system. Search this commit diff for
   `exe.run()` for an example.
 * Zig build by default enables caching. All build artifacts will go
   into zig-cache. If you want to access build artifacts in a convenient
   location, it is recommended to add an `install` step. Otherwise
   you can use the `run()` API mentioned above to execute programs
   directly from their location in the cache. Closes #330.
   `addSystemCommand` is available for programs not built with Zig
   build.
 * Please note that Zig does no cache evicting yet. You may have to
   manually delete zig-cache directories periodically to keep disk
   usage down. It's planned for this to be a simple Least Recently
   Used eviction system eventually.
 * `--output`, `--output-lib`, and `--output-h` are removed. Instead,
   use `--output-dir` which defaults to the current working directory.
   Or take advantage of `--cache on`, which will print the main output
   path to stdout, and the other artifacts will be in the same directory
   with predictable file names. `--disable-gen-h` is available when
   one wants to prevent .h file generation.
 * `@cImport` is always independently cached now. Closes #2015.
   It always writes the generated Zig code to disk which makes debug
   info and compile errors better. No more "TODO: remember C source
   location to display here"
 * Fix .d file parsing. (Fixes the MacOS CI failure)
 * Zig no longer creates "temporary files" other than inside a
   zig-cache directory.

This breaks the CLI API that Godbolt uses. The suggested new invocation
can be found in this commit diff, in the changes to `test/cli.zig`.
2019-03-08 23:23:11 -05:00
Jay Weisskopf cddc77dd97 Remove glibc compat shim with restrictive license
Unlike the other glibc source code checked into the repo, `csu/init.c`
did not have a license clause that allowed linking without restrictions.

`_IO_stdin_used` is the only symbol in the file and appears to be a 20
year old compatibility shim for the glibc 2.0 ABI. Obsolete in 2.1.
2019-03-08 08:46:06 -05:00
Andrew Kelley 1e634a384c Merge branch 'glibc'
See #514
2019-03-07 16:55:31 -05:00
Andrew Kelley 2bb6825baa fix passing invalid argument -NDEBUG 2019-03-07 16:53:44 -05:00
Andrew Kelley 46242c4d38 fix -mllvm command line option regression 2019-03-07 16:08:25 -05:00
Andrew Kelley bbbcf16ef9 fix linking glibc: caching static libs and
handle linking pthread, rt, dl, m better
2019-03-07 15:50:49 -05:00
Andrew Kelley 2caf39c961 fix .d file processing and use -MV to quote spaces 2019-03-07 14:30:50 -05:00
Andrew Kelley 431b3b2459 fix windows build 2019-03-07 13:32:43 -05:00
Andrew Kelley 197311d7dd windows and uefi don't have dynamic linkers 2019-03-07 13:25:17 -05:00
Andrew Kelley 4d8467fafc better behavior when cache dir unavailable
and choose different manifest dir for local cache to avoid
conflict with zig build
2019-03-07 13:16:52 -05:00
Andrew Kelley e2ce00f272 fix regressions on macos 2019-03-07 13:04:10 -05:00
Andrew Kelley ffaa4f0a87 dynamic_linker_path can be null on some targets 2019-03-07 12:21:27 -05:00
Andrew Kelley ce76de35f1 multi-arch glibc headers 2019-03-07 12:16:10 -05:00
Sahnvour 5469e3e3c1 missed change when switching TypeInfo to use comptime_int
fixes #2030
2019-03-06 15:27:56 -05:00
Andrew Kelley ccdef8c0fb cross compile glibc startup files 2019-03-06 13:22:36 -05:00
Andrew Kelley 697b1233f0 support other architectures for glibc startup files 2019-03-06 12:10:03 -05:00
Andrew Kelley ba144b366c build libunwind.a from source and link it 2019-03-05 22:45:41 -05:00
Andrew Kelley 4c386436ea support glibc dl, m, pthread, rt 2019-03-05 18:17:22 -05:00
Andrew Kelley e06da10838 fix translate-c 2019-03-05 16:12:19 -05:00
Andrew Kelley 55a0016221 dynamic linker path is independent from libc installation 2019-03-05 16:00:28 -05:00
Andrew Kelley 0d10ab0680 stop linking against gcc files 2019-03-05 14:37:32 -05:00
Andrew Kelley dd263eccb7 support crtbegin.o and crtend.o when using explicit libc 2019-03-05 14:12:46 -05:00
Andrew Kelley c5fdea59d3 building glibc from source 2019-03-05 13:26:59 -05:00
Andrew Kelley aeb16010f3 initial glibc support 2019-03-04 22:15:53 -05:00
Andrew Kelley 9c5852aa86 fix slice of C pointer
closes #2002
2019-03-03 13:04:04 -05:00
Andrew Kelley d0d615d819 fix const initialization of optional C pointer to null 2019-03-03 10:47:06 -05:00
Andrew Kelley e402455704 rename std lib files to new convention 2019-03-02 16:46:04 -05:00
Andrew Kelley f7835000b6 @returnAddress and @frameAddress return usize now 2019-03-02 15:34:58 -05:00