Commit Graph

416 Commits (700bb19a9053e236df6a9f15d435c427391e3ecf)

Author SHA1 Message Date
Andrew Kelley 59ac7b91da
add -fdump-analysis to dump type information to json
This commit adds -fdump-analysis which creates
a `$NAME-analysis.json` file with all of the finished
semantic analysis that the stage1 compiler produced.
It contains types, packages, declarations, and files.

This is an initial implementation; some data will be
missing. However it's easy to improve the implementation,
which is in `src/dump_analysis.cpp`.

The next step for #21 will be to create Zig code which parses
this json file and creates user-facing HTML documentation.

This feature has other uses, however; for example, it could
be used for IDE integration features until the self-hosted
compiler is available.
2019-10-03 17:58:22 -04:00
Andrew Kelley 0dd8adcdb4
Release 0.5.0 2019-09-30 10:09:33 -04:00
Andrew Kelley 2f20833097
add -DZIG_SKIP_INSTALL_LIB_FILES cmake option
closes #2221
2019-09-26 02:21:29 -04:00
Andrew Kelley dc7016344e
remove --override-std-dir. fix issues caused by moving std lib 2019-09-25 23:59:07 -04:00
Andrew Kelley 185cb13278
Merge remote-tracking branch 'origin/master' into llvm9 2019-09-10 13:00:35 -04:00
Andrew Kelley 0489d06c24
make the std lib support event-based I/O
also add -fstack-report
2019-09-10 10:26:52 -04:00
Andrew Kelley 2482bdf22b
release builds of stage1 have llvm ir verification
the stage2 zig code however gets compiled in release mode,
and stripped.
2019-09-09 09:33:33 -04:00
Sahnvour 19cf9bd062 use /debug:fastlink when building with msvc and debug info 2019-09-09 00:26:39 -04:00
emekoi 9423d382fb fixed compiler error for gcc 9.2.0 2019-09-06 19:20:25 -04:00
Michael Dusan 00d82e34df cmake: improve building without git repository
- quiet `fatal: not a git repository` message
- if git probe fails skip ZIG_VERSION modification
2019-09-02 21:36:16 -04:00
Andrew Kelley 6529658ad8
Merge remote-tracking branch 'origin/master' into llvm9 2019-08-16 16:43:56 -04:00
Andrew Kelley 8b97a1aee2
Merge pull request #3033 from ziglang/rewrite-coroutines
rework async function semantics
2019-08-15 14:01:01 -07:00
Andrew Kelley 729807203a
force static libs for vendored dependencies 2019-08-15 14:34:52 -04:00
Andrew Kelley ffab950e0c
update embedded LLD to 9.0.0rc1 2019-08-03 12:56:35 -04:00
Andrew Kelley b3b6a98451
Merge remote-tracking branch 'origin/master' into rewrite-coroutines 2019-08-02 16:31:43 -04:00
emekoi 357fb4f143 avoid passing -static to msvc when static linking 2019-07-27 17:54:20 -05:00
emekoi 5593c63e12 improved CMake file for MinGW 2019-07-26 16:26:01 -05:00
Andrew Kelley 72e983670e
simple async function call working 2019-07-21 16:21:16 -04:00
daurnimator 3a67c13b5d cmake: allow user to select static vs dynamic LLVM 2019-07-16 12:33:13 -04:00
Andrew Kelley 0cd660462f
move install_files.h to not be generated code 2019-07-15 01:47:26 -04:00
Andrew Kelley 40a562f26d
cmake: fix incorrect dependencies 2019-07-15 01:45:26 -04:00
Andrew Kelley 6096dc5f94
move some of the installation from cmake to zig build
This moves the installation of shipped source files from large
CMakeLists.txt lists to zig build recursive directory installation.

On my computer a cmake `make install` takes 2.4 seconds even when it has
to do nothing, and prints a lot of unnecessary lines to stdout that say
"up-to-date: [some file it is installing]".

After this commit, the default output of `make` is down to 1
second, and it does not print any junk to stdout. Further, a `make
install` is no longer required and `make` is sufficient.

This closes #2874.

It also closes #2585. `make` now always invokes `zig build` for
installing files and libuserland.a, and zig's own caching system makes
that go fast.
2019-07-15 01:45:26 -04:00
Andrew Kelley 7d9ee5d6d5
Merge pull request #2882 from andersfr/hash-branch
Implementation of MurmurHash and CityHash
2019-07-13 20:08:18 -04:00
emekoi 1547692d18 fixed static linking on mingw-w64 2019-07-13 20:05:13 -04:00
andersfr 69129c2e93 Intentional wraparound used + 2019-07-13 13:59:15 +02:00
emekoi bdfb31420a fixed compilation on mingw-w64 2019-07-12 19:40:51 -04:00
Andrew Kelley 3714d524c3
add some more windows defs 2019-07-10 19:40:46 -04:00
Andrew Kelley 2bb93784c6
mingw: build and link mingwex.lib
zig can now cross compile hello.c targeting windows
2019-07-10 17:41:34 -04:00
Andrew Kelley 67f3bc9101
mingw: building and linking msvcrt-os.lib 2019-07-10 16:19:51 -04:00
Andrew Kelley ea90a3a9a1
mingw: building and linking mingw32.lib 2019-07-10 14:13:00 -04:00
Andrew Kelley 1c7f21852f
ship with mingw-w64 v6.0.0
See #514
2019-07-09 23:34:16 -04:00
Andrew Kelley 7ccf7807b3
ability to target any glibc version 2019-07-07 17:56:08 -04:00
Andrew Kelley 3b97940fb3
add an update_glibc tool, delete dummy libc files
This is the beginning of supporting minimum GLIBC version as part of the
target. See #2509 for the motivation.

The dummy libc zig files are removed. A future commit will build them
on-the-fly, using the generated text files generated by the new tool,
which are checked into source control and distributed along with zig.

These generated text files are, together, 142KB (20KB gzipped).
Compare that to a naive bundling of the .abilist files, which would be
2.2MiB (375KB gzipped).

This is based on glibc 2.29.
2019-07-07 17:56:07 -04:00
Andrew Kelley 4b7e04f75a
rename std/special/bootstrap.zig to std/special/start.zig 2019-06-28 02:00:56 -04:00
Andrew Kelley ba29435f67
Merge branch 'http.headers' of https://github.com/daurnimator/zig into daurnimator-http.headers 2019-06-27 13:37:40 -04:00
Andrew Kelley 0041e00a78
fixups
* move LoggingAllocator to its own file
 * style conventions
 * add documentation
 * use `anyerror` instead of `error{}` for the stream
2019-06-27 12:04:14 -04:00
Andrew Kelley 3085d29af8
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-26 14:44:01 -04:00
Andrew Kelley b2cbc59e4c
Merge branch 'simd2' of https://github.com/shawnl/zig into shawnl-simd2 2019-06-23 17:10:33 -04:00
emekoi ca3660f6bf increase stack size for mingw 2019-06-23 16:51:12 -04:00
Andrew Kelley 036cc48a82
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-23 01:29:48 -04:00
emekoi f1c57a7f84 supress warnings for format strings on msys64 2019-06-22 20:21:48 -05:00
Andrew Kelley 04c25efe11
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-19 19:01:28 -04:00
Shawn Landden fce2d2d18b stage1: add support for @mulAdd fused-multiply-add for floats and vectors of floats
Not all of the softfloat library is being built....

Vector support is very buggy at the moment, but should work when the bugs are fixed.
(as I had the same code working with another vector function, that hasn't been merged yet).
2019-06-19 12:07:02 -05:00
daurnimator 6ce2a03985 std: add gimli permutation to crypto 2019-06-16 22:55:38 -04:00
daurnimator 43d52fa4c5
std: add std.http.Headers field
Based on lua-http's data structure
2019-06-11 22:54:40 +10:00
Andrew Kelley 3a4b749c8a
Merge remote-tracking branch 'origin/master' into copy-elision-3 2019-06-09 19:44:01 -04:00
emekoi 26613bfa01 switched to fixed-length buffer for error messages 2019-06-05 17:34:58 -05:00
emekoi 0288034c2f fixed mismatched types 2019-06-05 15:30:01 -05:00
Andrew Kelley 5e1003bc81
no-copy semantics for basic runtime function call variable init
```zig
export fn entry() void {
    var x: Foo = foo();
}
```

```llvm
define void @entry() #2 !dbg !37 {
Entry:
  %x = alloca %Foo, align 4
  call fastcc void @foo(%Foo* sret %x), !dbg !48
  call void @llvm.dbg.declare(metadata %Foo* %x, metadata !41, metadata !DIExpression()), !dbg !49
  ret void, !dbg !50
}
```
2019-05-30 17:11:14 -04:00
Andrew Kelley 5954d5235f
Merge pull request #2182 from mikdusan/issue.2046
new .d file parser for stage1 compiler
2019-05-30 11:53:08 -04:00