Andrew Kelley
f70ce707e2
update musl headers to musl v1.1.23
2019-07-16 19:02:51 -04:00
Andrew Kelley
776423bbf7
fix result location alignment in ir_render_call
2019-07-15 23:44:44 -04:00
Andrew Kelley
7b8ba871a9
mingw libc: solve the segfault having to do with destructors
...
* fixed --verbose-cc printing an extra "zig" before the rest of
the command line
* windows-gnu targets use libfoo.a, foo.o extensions to match mingw
conventions.
2019-07-12 14:44:34 -04:00
Andrew Kelley
d9c4c96bf2
add -Wno-pragma-pack when targeting windows-gnu
...
windows.h has files such as pshpack1.h which do #pragma packing,
triggering a clang warning. So for this target, this warning is
disabled.
this commit also improves the error message printed when no libc can be
used, printing the "zig triple" rather than the "llvm triple".
2019-07-11 23:48:13 -04:00
Andrew Kelley
ea90a3a9a1
mingw: building and linking mingw32.lib
2019-07-10 14:13:00 -04:00
Andrew Kelley
56d8185650
expose glibc version in builtin
2019-07-07 17:56:43 -04:00
Andrew Kelley
7ccf7807b3
ability to target any glibc version
2019-07-07 17:56:08 -04:00
Andrew Kelley
4606baee07
add -ffunction-sections arg when building C objects
...
the other changes in this commit are minor tidying up
2019-07-03 15:46:27 -04:00
Andrew Kelley
2f4faf306d
Merge branch 'function-sections' of https://github.com/timonkruiper/zig into timonkruiper-function-sections
2019-07-03 14:43:33 -04:00
Andrew Kelley
9da054095c
Merge branch 'comptime-union-init' of https://github.com/rbscott/zig into rbscott-comptime-union-init
2019-07-03 11:26:55 -04:00
Andrew Kelley
140335b99f
Merge branch 'has-field' of https://github.com/shawnl/zig into shawnl-has-field
2019-07-02 16:21:40 -04:00
Andrew Kelley
b05b5649df
print dir name on failure to write to cache dir
...
closes #2429
2019-07-02 16:11:05 -04:00
Andrew Kelley
704444a6e3
improved logic on whether to include start files
2019-07-02 14:26:54 -04:00
Timon Kruiper
bbc0d440b8
Added ZigLLVMCreateTargetMachine and pass function-sections flag
...
Also added extra cache line
Added the ZigLVVMCreateTargetMachine to self hosted zig code
2019-07-02 19:54:29 +02:00
Timon Kruiper
7586f613d5
Added function-section functionality
2019-07-01 17:49:08 +02:00
Andrew Kelley
4b7e04f75a
rename std/special/bootstrap.zig to std/special/start.zig
2019-06-28 02:00:56 -04:00
Andrew Kelley
69c7c5de09
fixups
...
* better detection for already seen packages
* "root" instead of "@root"
2019-06-27 19:15:33 -04:00
Andrew Kelley
fe2d89007b
Merge branch 'root-import' of https://github.com/emekoi/zig into emekoi-root-import
2019-06-27 18:38:28 -04:00
Andrew Kelley
517bdea754
fix incorrectly omitting variable declarations
...
in non-debug modes
2019-06-26 16:27:24 -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
33f996bb16
all tests passing on linux
2019-06-26 14:00:44 -04:00
Andrew Kelley
c61e0a078c
fix union init with void payload
...
all std lib tests passing now
2019-06-25 11:31:38 -04:00
Michael Dusan
3021e5ca67
align (vector -> array) store to result location
2019-06-24 14:52:57 -04:00
Andrew Kelley
86f362ce8e
elide redundant safety check when switching on tagged unions
2019-06-22 16:18:42 -04:00
Shawn Landden
71e014caec
stage1: add @sin @cos @exp @exp2 @ln @log2 @log10 @fabs @floor @ceil @trunc @round
...
and expand @sqrt
This revealed that the accuracy of ln is not as good as the current algorithm in
musl and glibc, and should be ported again.
v2: actually include tests
v3: fix reversal of in and out arguments on f128M_sqrt()
add test for @sqrt on comptime_float
do not include @nearbyInt() until it works on all targets.
2019-06-22 14:34:34 -05:00
Andrew Kelley
142e77abbb
fix extern functions returning byval structs
2019-06-21 14:44:49 -04:00
Andrew Kelley
237233b04b
fix coroutines
2019-06-20 18:27:04 -04:00
Andrew Kelley
78eeb6e9ae
fix double getelementptr of runtime global
2019-06-19 22:29:39 -04:00
Andrew Kelley
04c25efe11
Merge remote-tracking branch 'origin/master' into copy-elision-3
2019-06-19 19:01:28 -04:00
Andrew Kelley
4ffab5b85f
fix optional pointer to size zero struct
2019-06-19 18:47:02 -04:00
Andrew Kelley
96931228af
fix comptime test error for empty error set
2019-06-19 16:29:46 -04:00
Andrew Kelley
974db231a0
fix extraneous nested union field instruction
2019-06-19 16:16:47 -04:00
Andrew Kelley
b588a803bf
fix comptime modification of const struct field
2019-06-19 14:35:59 -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
Andrew Kelley
e27da17ff2
back to many behavioral tests passing
2019-06-18 17:07:27 -04:00
Jonathan Marler
21dff1c4e2
Remove duplicate exe name with zig run
2019-06-17 14:10:10 -04:00
Andrew Kelley
b025193de5
inferred comptime values rather than elided scopes
...
because of this example:
```zig
export fn entry(b: bool) usize {
var runtime = [1]i32{3};
comptime var i: usize = 0;
inline while (i < 2) : (i += 1) {
const result = if (i == 0) [1]i32{2} else runtime;
}
comptime {
return i;
}
}
```
The problem is that the concept of "resetting" a result location,
introduced in the previous commit, cannot handle elision scopes.
This concept is inherently broken with inline loops.
2019-06-17 13:31:19 -04:00
Andrew Kelley
9564c05cd5
better result location handling of inline loops
2019-06-15 19:19:13 -04:00
Andrew Kelley
6bf193af19
better result location semantics with optionals and return locations
...
somewhere along this branch, #1901 has been fixed.
2019-06-15 12:28:21 -04:00
Andrew Kelley
60025a3704
Merge remote-tracking branch 'origin/master' into copy-elision-3
2019-06-15 10:34:04 -04:00
Andrew Kelley
7c5ceb0c4c
standard library integrates with knowledge of stripped debug info
2019-06-14 18:45:41 -04:00
Andrew Kelley
362c79140f
expose builtin.strip_debug_info
...
zig code now can be made aware that it will not have any debug
information available at runtime.
2019-06-14 18:18:43 -04:00
Andrew Kelley
f8f054b354
fix @export
for arrays not respecting the symbol name
...
Previously, the symbol name parameter of `@export` would be ignored for
variables, and the variable name would be used for the symbol name.
Now it works as expected.
See #2679
2019-06-14 17:23:24 -04:00
Andrew Kelley
2ba29a1907
fix peer result location with error code and payload
2019-06-14 11:01:38 -04:00
emekoi
3ed6acd2d2
fixed infinite loop when caching packages
2019-06-11 19:19:44 -05:00
emekoi
e12c7d88b2
made root package available to itself
2019-06-11 16:06:24 -05:00
emekoi
4ea7685a5b
made root package available to all other packages
2019-06-11 16:05:56 -05:00
Andrew Kelley
b3a4ec1bd2
fix returning scalar values
...
```zig
export fn entry1() i32 {
return bar();
}
```
```llvm
define i32 @entry1() #2 !dbg !35 {
Entry:
%0 = call fastcc i32 @bar(), !dbg !39
ret i32 %0, !dbg !41
}
```
2019-06-11 16:04:04 -04:00
Andrew Kelley
e1d14e73b5
fix @bitCast
semantics when there is no parent result loc
2019-06-11 15:44:06 -04:00
Andrew Kelley
fc8d881240
fix struct and array init when result casted to anyerror!?T
2019-06-11 13:27:01 -04:00