Brian Cain
607892a30d
Create an "LLD_LIBDIRS" var to override lld loc
2020-03-30 11:01:36 -04:00
LemonBoy
1ef6f068f5
compiler-rt: Implement all the shift builtins
...
* Unify all the code paths with a generic function
* Add some EABI aliases
Closes #4853
2020-03-30 10:58:47 -04:00
daurnimator
9bc8a1e1d0
std: add some missing errnos on linux
2020-03-30 10:55:18 -04:00
daurnimator
356ef3840f
std: update for linux 5.6 release
2020-03-30 10:55:18 -04:00
Michael Raymond
de9933761c
std.zig.render: fix newlines before DocComments
2020-03-29 22:41:39 -04:00
Andrew Kelley
b717df786b
Merge pull request #4845 from xackus/fix-parseFloat
...
fix overflow in parseFloat and cleanup
2020-03-29 22:40:32 -04:00
Andrew Kelley
f9f7deaeda
linking against c++ does not trigger system library directories
2020-03-29 20:58:59 -04:00
xackus
6809222d32
cleanup parse_float.zig
2020-03-29 20:52:25 +02:00
Andrew Kelley
5aa2812507
linking is now aware -lm is provided by mingw-w64
2020-03-29 13:17:21 -04:00
Andrew Kelley
c70471fae6
enable now-passing test cases
...
These can now be enabled thanks to bug fixes that landed in
LLVM 10.
2020-03-29 10:34:12 -04:00
Andrew Kelley
38a1af5d4f
zig cc: -O0 also counts as debug mode
2020-03-29 10:34:12 -04:00
xackus
d1202b1f66
fix overflow in parseFloat
2020-03-29 11:50:41 +02:00
Andrew Kelley
86795c03f9
Merge pull request #4844 from layneson/translatec_string_concat
...
Support string concatenation in Translate-C
2020-03-29 00:31:50 -04:00
Sebastian
2b0d66736a
tcpConnectToHost - fixed compilation error
...
before:
```
std\net.zig:403:23: error: type '@TypeOf(std.net.getAddressList).ReturnType.ErrorSet!*std.net.AddressList' does not support field access
const addrs = list.addrs.toSliceConst();
^
```
2020-03-28 21:34:50 -04:00
Layne Gustafson
a55897106e
Add macro string concat tests
2020-03-28 20:40:26 -04:00
Layne Gustafson
2a05ca1c94
Conv macro string concat to ++
2020-03-28 20:40:13 -04:00
Andrew Kelley
f9db21f03e
Merge pull request #4838 from squeek502/for-linker
...
zig cc: Add support for -Xlinker, --for-linker, --for-linker=, -z
2020-03-28 12:03:35 -04:00
Luna
2028b4ce91
Fix typo in Serializer declaration
2020-03-28 12:01:29 -04:00
LemonBoy
d788b0cd8b
std: Minor changes to TLS handling
...
* Always allocate an info block per-thread so that libc can store
important stuff there.
* Respect ABI-mandated alignment in more places.
* Nicer code, use slices/pointers instead of raw addresses whenever
possible.
2020-03-28 11:20:38 -04:00
Ryan Liptak
cc7c670851
Sync clang_options_data.zig with update_clang_options
...
Some of the recent c++ related options were added to update_clang_options but didn't make it into clang_options_data.zig
2020-03-28 00:39:33 -07:00
Ryan Liptak
874b4618ca
zig cc: Add support for -z
...
This is only the first step; it makes zig cc recognize -z and append it to the linker args, but the linker arg parsing doesn't support -z yet so it will just give the warning 'unsupported linker arg: -z'
2020-03-28 00:35:54 -07:00
Ryan Liptak
b0b29b8a2f
zig cc: Add support for -Xlinker, --for-linker, --for-linker=
2020-03-27 23:32:01 -07:00
Andrew Kelley
12e1c6e21c
Merge pull request #4835 from squeek502/export-dynamic
...
-rdynamic/--export-dynamic fixes
2020-03-28 02:16:09 -04:00
Andrew Kelley
69aa09948b
cmake: support cross compiling
2020-03-27 23:43:21 -04:00
Andrew Kelley
107b5196f6
Merge pull request #4827 from ziglang/zig-cpp
...
support compiling and linking c++ code
2020-03-27 22:35:13 -04:00
Andrew Kelley
a258741084
initial support of response files
...
See #4833
It doesn't support comments or quotes yet.
2020-03-27 22:24:40 -04:00
Andrew Kelley
e803490a56
cmake: support finding a cross compiled llvm
2020-03-27 22:24:15 -04:00
Michael Dusan
33819ecfbc
windows: don't hard-code forward-slash paths
...
`zig targets` -> unable to list targets: BadPathName
2020-03-27 21:28:52 -04:00
Andrew Kelley
0d7bd9f3ce
Merge pull request #4832 from LemonBoy/watwatwat
...
Fix the weird-ass crash on AArch64
2020-03-27 21:28:16 -04:00
Ryan Liptak
e7847f8d42
zig cc: Add --export-dynamic linker flag support
2020-03-27 17:42:02 -07:00
Ryan Liptak
1a95f1c2e0
Fix -rdynamic not sending --export-dynamic to the ELF linker
2020-03-27 17:36:43 -07:00
Michael Dusan
547ba8eb20
Merge pull request #4813 from mikdusan/cmake3.17
...
cmake: address new warnings from cmake-3.17
2020-03-27 19:15:50 -04:00
LemonBoy
ddda50a38d
ci: Delete workaround for #4822
2020-03-27 20:13:23 +01:00
LemonBoy
0512be227c
compiler-rt: Fix __floatunditf
...
This builtin converts a u64 into a f128, not a u128 into a f128.
Fixes some weird-ass crashes that happened only on AArch64 systems.
2020-03-27 20:10:59 +01:00
Andrew Kelley
f407109070
zig c++: get it working with musl and mingw-w64
2020-03-27 12:38:52 -04:00
Andrew Kelley
db17c0d88c
ability to compile c++ hello world with zig c++
...
closes #4786
2020-03-26 22:48:37 -04:00
Andrew Kelley
ed0dbe1a64
add libc++ and libc++abi sources
...
upstream: LLVM 10
2020-03-26 22:41:26 -04:00
Andrew Kelley
aec4967f36
Merge pull request #4814 from gereeter/reduced-path-max
...
In AtomicFile, work relative to the destination's parent directory
2020-03-26 20:32:06 -04:00
Andrew Kelley
463b90b977
ci: fix aarch64 linux
...
This patch adds a workaround for #4822 , disables one failing langref
example, and enables the rest of the test suite.
You win some, you lose some.
2020-03-26 19:42:28 -04:00
Jonathan S
cf4cbea88e
Factor out arbitrary constant 12 to AtomicFile.RANDOM_BYTES
2020-03-26 15:07:40 -05:00
Andrew Kelley
ab20b351ce
update compile error tests
2020-03-26 14:07:19 -04:00
Andrew Kelley
0d4354324c
fix behavior tests compile error on i386-linux
2020-03-26 12:54:59 -04:00
Andrew Kelley
ddd98a7f10
prevent ptr cast from forcing alignment resolution unnecessarily
2020-03-26 12:34:16 -04:00
Jonathan S
a779a96d38
In AtomicFile, work relative to the destination's parent directory. This is more robust against concurrent filesystem reorganization and avoids path length issues.
2020-03-25 23:22:36 -05:00
Andrew Kelley
f7f563ea53
Revert "Merge pull request #4807 from LemonBoy/tls-touchups"
...
This reverts commit ee6fda2297
, reversing
changes made to f313ab18ae
.
This caused a test failure:
```
behavior.misc.test "behavior-arm-linux-none-Debug-bare-multi thread local variable"...test failure
/home/vsts/work/1/s/lib/std/testing.zig:191:14: 0x4608f in std.testing.expect (test)
if (!ok) @panic("test failure");
^
/home/vsts/work/1/s/test/stage1/behavior/misc.zig:616:11: 0x53e93 in behavior.misc.test "behavior-arm-linux-none-Debug-bare-multi thread local variable" (test)
expect(S.t == 1235);
^
```
2020-03-25 21:12:24 -04:00
Andrew Kelley
5ec6a0ea02
fix an invalid free having to do with bound functions
...
this should fix the drone CI failure
2020-03-25 21:00:02 -04:00
Andrew Kelley
fae6cf0961
improved handling of native system directories
...
* `-isystem` instead of `-I` for system include directories
fixes a problem with native system directories interfering with zig's
bundled libc.
* separate Stage2Target.is_native into Stage2Target.is_native_os and
Stage2Target.is_native_cpu.
2020-03-25 20:34:15 -04:00
Michael Dusan
dd66fbb96a
Merge pull request #4811 from mikdusan/fix4634
...
self-hosted: use fs.selfExePathAlloc
2020-03-25 19:49:52 -04:00
Andrew Kelley
e3fec6cce9
zig cc: add detection for -###
...
it turns on --verbose-cc and --verbose-link
2020-03-25 19:32:12 -04:00
Benjamin Feng
9dbfee49d7
Carry-over stream error to JSON.stringify
2020-03-25 18:54:04 -04:00