Andrew Kelley
540bac0928
Merge branch 'master' into self-hosted
2017-10-27 01:28:08 -04:00
Andrew Kelley
5f28a9d238
cleaner verbose flags and zig build prints failed command
2017-10-25 23:10:41 -04:00
Andrew Kelley
4f4da3c10c
wip self hosted code
2017-10-24 10:08:20 -04:00
Andrew Kelley
cbb6d2239f
look for libc at runtime on windows
...
See #539
before we close the issue we should also detect MSVC 2017
but this gets us started with supporting MSVC 2015
2017-10-16 12:21:46 -04:00
Andrew Kelley
562f91e875
clean up some resources
2017-10-15 21:06:04 -04:00
Andrew Kelley
271d6f8bb2
fix regression from previous commit
2017-10-01 18:33:57 -04:00
Andrew Kelley
1962c8588f
implement standard library path search
...
closes #463
See #302
2017-10-01 18:30:31 -04:00
Andrew Kelley
0975e37b16
fix implementation of --zig-std-dir
...
see #463
2017-10-01 15:51:55 -04:00
Andrew Kelley
ba3d21ca67
better divTrunc codegen
...
branch and phi instead of select instruction
fixes division test for windows. See #302
2017-09-30 16:59:31 -04:00
Andrew Kelley
845f22101b
zig test on 64-bit windows runs 32-bit tests
2017-09-30 14:40:16 -04:00
Andrew Kelley
d43204c950
better output for cross platform zig test on windows
2017-09-30 14:07:26 -04:00
Andrew Kelley
46ddeb0baf
add --verbose-link option
...
only prints the link line
2017-09-18 21:06:53 -04:00
Andrew Kelley
b8ee3a8143
add -mllvm support
...
useful for debugging crashes in llvm optimizer
2017-09-17 17:46:16 -04:00
Andrew Kelley
7ee00730ac
add option to run tests in LLDB and turn it on for macos travis
2017-09-17 14:43:51 -04:00
Marc Tiehuis
71342f8249
Add dash arguments for cli
2017-09-17 12:26:13 +12:00
Andrew Kelley
2c9bdad346
rename parseh to parsec
2017-09-05 22:55:03 -04:00
Andrew Kelley
e1d5da20a5
rewrite parseh to use AST instead of direct types
...
some tests still failing
2017-09-02 04:11:23 -04:00
Andrew Kelley
eb0979189b
add windows to test targets
...
cross-compiling hello world with no libc for windows is working
2017-08-31 11:41:58 -04:00
Andrew Kelley
0e9bdb44a6
test suite cross-compile builds tests for other targets
2017-08-30 14:55:26 -04:00
Andrew Kelley
6c7e975b75
remove remnants of depending on darwin system linker
2017-08-28 03:31:57 -04:00
Andrew Kelley
0a922d3bca
move docs to website
2017-08-20 17:30:02 -04:00
Andrew Kelley
d5271d1e49
more zen
2017-08-20 12:10:21 -04:00
Andrew Kelley
f248ef5f3f
move zen of zig to a sub command
2017-08-20 04:25:42 -04:00
Andrew Kelley
6a93dda3e1
progress toward windows hello world working
2017-06-14 00:04:34 -04:00
Andrew Kelley
24a9a42966
add safe release build mode
...
closes #288
2017-05-02 17:34:21 -04:00
Andrew Kelley
3cbd0065fa
basic support for specifying packages at the command line
...
See #226
2017-05-01 16:35:10 -04:00
Andrew Kelley
17b935325e
@import("builtin") instead of @compileVar
...
See #226
Closes #220
2017-05-01 13:12:38 -04:00
Andrew Kelley
363d9038c9
zig build: organize build artifacts
...
closes #328
2017-04-30 18:56:24 -04:00
Andrew Kelley
a147f06585
zig puts temporary object files in zig-cache folder
...
See #298
2017-04-28 02:22:12 -04:00
Andrew Kelley
7e11ef79d6
zig test no longer requires a separate test_runner.o file
...
See #298
2017-04-27 16:19:20 -04:00
Andrew Kelley
7b0542d08b
build system: consolidate duplicate code and more
...
* add ability to add assembly files when building an exe, obj, or lib
* add implicit cast from `[N]T` to `?[]const T` (closes #343 )
* remove link_exe and link_lib in favor of allowing build_exe and
build_lib support no root zig source file
2017-04-26 19:17:05 -04:00
Andrew Kelley
e0050af293
add some timing diagnostics
...
pass --enable-timing-info to print a nice table like this:
```
Name Start End Duration Percent
Initialize 0.0000 0.0000 0.0000 0.0001
Semantic Analysis 0.0000 0.0421 0.0420 0.2109
Code Generation 0.0421 0.0620 0.0200 0.1003
LLVM Emit Object 0.0620 0.1852 0.1231 0.6180
Build Dependencies 0.1852 0.1974 0.0122 0.0615
LLVM Link 0.1974 0.1993 0.0018 0.0093
Generate .h 0.1993 0.1993 0.0000 0.0000
Total 0.0000 0.1993 0.1993 1.0000
```
2017-04-25 12:29:25 -04:00
Andrew Kelley
245eed8afe
better stack traces for ELF x86_64
2017-04-24 12:14:45 -04:00
Andrew Kelley
6de33ded81
make undefined as a constant value lazy
...
closes #268
2017-04-23 14:34:40 -04:00
Andrew Kelley
fb492d19eb
zig build system supports building a library
...
See #329
Supporting work:
* move std.cstr.Buffer0 to std.buffer.Buffer
* add build.zig to example/shared_library/ and add an automated test
for it
* add std.list.List.resizeDown
* improve std.os.makePath
- no longer recursive
- takes into account . and ..
* add std.os.path.isAbsolute
* add std.os.path.resolve
* reimplement std.os.path.dirname
- no longer requires an allocator
- handles edge cases correctly
2017-04-21 01:56:12 -04:00
Andrew Kelley
d12f1f5b49
test framework supports name prefix and filter argument
...
rename self hosted tests to behavior tests
2017-04-19 15:38:12 -04:00
Andrew Kelley
666435195f
update zig build help text when no build.zig found
2017-04-19 04:36:48 -04:00
Andrew Kelley
37b9a2e6a4
convert compare-output tests to use zig build system
2017-04-19 01:15:20 -04:00
Andrew Kelley
47336abae3
improvements to zig build system and unwrap error safety
...
* zig build system: create standard dynamic library sym links
* unwrapping an error results in a panic message that contains
the error name
* rename error.SysResources to error.SystemResources
* add std.os.symLink
* add std.os.deleteFile
2017-04-17 06:47:20 -04:00
Andrew Kelley
5fdefe58e4
zig build system understands the concept of dependencies
...
See #204
2017-04-13 17:21:00 -04:00
Andrew Kelley
2864359950
zig build system writes template build.zig file when none exists
...
see #204
2017-04-11 06:14:46 -04:00
Andrew Kelley
6fbe1632d0
Update zig build system to support user defined options
...
* Fix assertion failure when switching on type.
Closes #310
* Update zig build system to support user defined options.
See #204
* fmt.format supports {sNNN} to set padding for a buffer arg.
* add std.fmt.bufPrint and std.fmt.allocPrint
* std.hash_map.HashMap.put returns the previous value
* add std.mem.startsWith
2017-04-06 05:34:04 -04:00
Andrew Kelley
d65cd73a8b
add support to use zig as a linker driver
...
closes #243
I also added --grep to ./run_tests if you want to single out
some specific tests
2017-04-05 07:49:40 -04:00
Andrew Kelley
8c10b6dcbd
ability to use zig as an assembler
...
see #243
2017-04-05 03:36:55 -04:00
Andrew Kelley
e332cd65c9
zig build system: delete ./build file on success
...
see #204
2017-04-04 02:02:51 -04:00
Andrew Kelley
1c6000d047
zig build system improvements, add some std API
...
* add std.buf_map.BufMap
* add std.buf_set.BufSet
* add std.mem.split
* zig build system improvements (See #204 )
- automatically parses NIX_CFLAGS_COMPILE and NIX_LDFLAGS
- add builder.addCIncludePath
- add builder.addRPath
- add builder.addLibPath
- add exe.linkLibrary
2017-04-04 01:52:20 -04:00
Andrew Kelley
3ca027ca82
first pass at zig build system
...
* `zig build --export [obj|lib|exe]` changed to `zig build_obj`,
`zig build_lib` and `zig build_exe` respectively.
* `--name` parameter is optional when it can be inferred from the
root source filename. closes #207
* `zig build` now looks for `build.zig` which interacts with
`std.build.Builder` to describe the targets, and then the zig
build system prints TODO: build these targets. See #204
* add `@bitcast` which is mainly used for pointer reinterpret
casting and make explicit casting not do pointer reinterpretation.
Closes #290
* fix debug info for byval parameters
* sort command line help options
* `std.debug.panic` supports format string printing
* add `std.mem.IncrementingAllocator`
* fix const ptr to a variable with data changing at runtime.
closes #289
2017-03-31 05:55:41 -04:00
Andrew Kelley
af536ac343
introduce new test syntax
...
* remove setFnTest builtin
* add test "name" { ... } syntax
* remove --check-unused argument. functions are always lazy now.
2017-03-16 16:02:35 -04:00
Andrew Kelley
7efa2cd81c
add --each-lib-rpath option and corresponding config option
...
This adds an rpath entry for each used dynamic library directory.
This is necessary on some systems such as NixOS.
2017-03-13 13:11:55 -04:00
Andrew Kelley
d10bbd28e9
use lld instead of system linker
2017-03-13 11:54:56 -04:00