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
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
Andrew Kelley
ee6fda2297
Merge pull request #4807 from LemonBoy/tls-touchups
...
std: Minor changes to TLS handling
2020-03-25 18:53:04 -04:00
Michael Dusan
9cc593ca78
cmake: address new warnings from cmake-3.17
...
Match package-name case from CMakeLists.txt .
New warning sample:
The package name passed to `find_package_handle_standard_args` (LLVM) does
not match the name of the calling package (llvm). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
2020-03-25 18:43:28 -04:00
Michael Dusan
d554070de1
self-hosted: use fs.selfExePathAlloc
...
- add fs.selfExePathAlloc
- use fs.selfExePathAlloc instead of fs.selfExeDirPathAlloc
- remove redundant code from fs.selfExeDirPath
closes #4634
2020-03-25 18:40:28 -04:00
Andrew Kelley
f313ab18ae
zig cc: freestanding target implies -nostdlib
2020-03-25 12:28:41 -04:00
Andrew Kelley
6cbe589b51
zig cc: support -T linker script option
2020-03-25 12:05:48 -04:00
Andrew Kelley
3869e80331
Merge pull request #4793 from LemonBoy/netbsd-forever
...
Netbsd forever
2020-03-25 10:19:49 -04:00
LemonBoy
abcd9ac9d0
Use const instead of var
2020-03-25 12:37:44 +01:00
LemonBoy
a34f67aa66
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-25 12:08:50 +01:00
LemonBoy
778dbc17ac
std: Fix setsockopt definition
...
* Add socketpair definition
2020-03-24 16:06:25 -04:00
Andrew Kelley
cbaede7f55
Merge pull request #4795 from LemonBoy/divtf3
...
Add __divtf3 to compiler-rt
2020-03-24 14:51:51 -04:00
LemonBoy
3ccf99c0bd
std: Slim duplicate logic for some calls
2020-03-24 19:47:18 +01:00
LemonBoy
cc774c603b
compiler-rt: Add __divtf3
2020-03-24 18:08:53 +01:00
LemonBoy
4e95662a4a
std: Add qNaN constants
2020-03-24 18:08:53 +01:00
Andrew Kelley
39589cffe0
compiler-rt: fix __clear_cache on aarch64 darwin
2020-03-24 11:51:13 -04:00
Andrew Kelley
03013e5176
compiler-rt: aarch64 implementation of __clear_cache
2020-03-24 10:33:23 -04:00
Andrew Kelley
93c7fa105f
Merge remote-tracking branch 'origin/llvm10'
...
LLVM 10 was released today
2020-03-24 09:57:09 -04:00
Joachim Schmidt
5acc8afb5f
Use math.Order for comparing bigints instead of i8 ( #4791 )
2020-03-23 23:16:57 -04:00
LemonBoy
c3f93be00c
std: Tell pthread the guard page size is zero
...
On NetBSD this is needed to avoid crashes in pthread_join as the default
value for the guard page size is not ignored even though a custom stack
address is specified.
2020-03-23 23:26:34 +01:00
LemonBoy
d6739b1397
std: Fix undefined field error
2020-03-23 23:26:21 +01:00
LemonBoy
b21d3535a5
std: Fix parameters for pthread_attr_setstack
...
The guard page size shouldn't be taken into account, pthread is only
interested in the usable area.
2020-03-23 20:12:10 +01:00
LemonBoy
09a5f172f8
std: Different thread stack allocation for NetBSD
...
* NetBSD is stricter than other OSs and doesn't allow mprotect to mark a
non-accessible region as RW
* Fix mprotect call over the whole stack, oops
2020-03-23 19:50:29 +01:00
LemonBoy
cda73c3c18
std: Add missing C bits and defines for NetBSD
2020-03-23 18:55:45 +01:00
LemonBoy
761602e3e8
std: Use getdents on all the BSDs
...
* Use the correct versioned libc calls to avoid nasty surprises
2020-03-23 18:54:14 +01:00
LemonBoy
336ed03f0f
debug: Accept relative paths in mapWholeFile
2020-03-23 18:51:49 +01:00
LemonBoy
27344464ed
std: Add missing C defines for NetBSD
2020-03-23 18:47:40 +01:00