Andrew Kelley
8f1408578c
update the CPU target features and models
...
Rather than directly pasting the output from the
target-details-generator tool, we have to look at the diff line by line
and decide how to incorporate the changes.
The baseline abstraction is something that Zig provides.
The changes to x86 appear to be incorrect. After LLVM commit
3ad09fd03c51823aeb0bcbd7898aada33e9228d6 the CPU features are stored in
a different data layout in their tables, and so we need to update the
target details extraction tool to match.
2020-12-16 17:25:48 -07:00
Andrew Kelley
bbb3403b5d
stage1: apply LLVM ssp attributes globally
...
instead of per-function. Otherwise LLVM asserts with:
"stack protected callee but caller requested no stack protector"
2020-12-16 15:45:32 -07:00
Andrew Kelley
da54e7cd00
update clang.zig and translate-c for the clang C++ API changes
2020-12-16 14:29:27 -07:00
Andrew Kelley
755c558026
Merge remote-tracking branch 'origin/master' into llvm12
2020-12-16 14:24:36 -07:00
Jakub Konka
f59069f3d0
Update clang options
...
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-12-16 18:38:11 +01:00
Jakub Konka
4b62f1bd93
Update changes due to different CPU feature sets
...
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-12-16 18:25:25 +01:00
Jakub Konka
1c40a4df09
Update zig_llvm.cpp and other bits
...
Include updates to corresponding zig sources
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-12-16 18:13:58 +01:00
Jakub Konka
6f3ed2f71f
Update target details
...
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
zig-llvm-target-details-generator commit
4299674ecabeb668b0d84285cd1b41a652a391b1
2020-12-16 18:13:52 +01:00
Jakub Konka
38bf94280b
Update libcxxabi
...
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-12-16 12:19:09 +01:00
Jakub Konka
f9a11fbfaf
Update libcxx
...
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-12-16 12:18:55 +01:00
Jakub Konka
1e66ac5755
Update libunwind
...
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-12-16 12:18:43 +01:00
Jakub Konka
8612dac225
Update clang headers
...
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-12-16 12:18:33 +01:00
Jakub Konka
83ff94406e
Update clang drivers
...
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b6
2020-12-16 12:18:14 +01:00
data-man
d877eb0e8d
Fix typo in math.order
2020-12-16 12:14:44 +02:00
Veikka Tuominen
d3a57b96a9
translate-c: detect parenthesized string literals
2020-12-16 12:13:23 +02:00
Jakub Konka
9c2d8056ce
Update LLVM version numbers in CMake
2020-12-16 09:37:32 +01:00
Andrew Kelley
b3c1ced2c3
Merge pull request #7431 from LemonBoy/fix-7426
...
stage1: Fix crash in can_mutate_comptime_var_state
2020-12-15 15:07:49 -05:00
Christian Wesselhoeft
b3f4802aa0
mingw-w64: add .def files for xaudio2_8
2020-12-15 15:00:39 -05:00
luna
0c33624a45
create SendToError ( #7417 )
...
* add SendToError
* remove error catch
* add missing SendToError entries
* add mappings to new errors for posix
* map windows sendto() errors
2020-12-15 14:56:42 -05:00
LemonBoy
5f7352b5b5
stage2: Add -include libc-symbols.h when building crtn.S
...
This -include is added for nearly every file in glibc's makefiles.
2020-12-15 14:53:46 -05:00
Sébastien Marie
96e3222796
openbsd: crt0.o file is different when build static or dynamic mode
...
it is a first step for support static *and* dynamic mode for openbsd
2020-12-15 14:53:23 -05:00
Sébastien Marie
8bf5a3a5c1
openbsd: correct few structs
...
- addrinfo: addr and canonname are switched (wrong layout)
- addrinfo, Flock, msghdr struct: use proper c_xxx type instead of fixed size. it should help using struct on all architectures supported by openbsd
2020-12-15 14:49:42 -05:00
Sebastien Marie
7cd6c25c8f
openbsd: link with required system libraries ( #7380 )
...
* openbsd: use -lpthread when linking
and while compiling zig stage2, use c++ and c++abi too
2020-12-15 14:45:48 -05:00
LemonBoy
8a2ab60fca
stage1: Don't skip steps when analyzing union types
...
Don't cut any corner and properly run the type trough every single step
even though it has no fields (or, better, the sum of the size of all its
fields is zero).
Fix the logic to consider an explicit non-zero-sized tag enough to treat
the type as sized.
Closes #7451
2020-12-15 14:40:21 -05:00
LemonBoy
bbfa3550a0
Add a test case
...
Co-authored-with: Vexu <git@vexu.eu>
2020-12-14 17:39:35 +01:00
data-man
8591f30b0d
Add missed Linux syscalls
2020-12-14 18:22:28 +02:00
Jakub Konka
91e8be385c
Merge pull request #7411 from LemonBoy/sigaction-smoke
...
std: Improve sigaction interface
2020-12-14 17:16:55 +01:00
LemonBoy
a471a57560
std: Fix formatting of type values
...
Closes #7429
2020-12-13 23:21:23 -05:00
Isaac Freund
343249efd8
stage2: use %type not @type for libc stubs
...
Apparently ARM uses @ for comments. Everything seems to accept % here
though.
2020-12-13 23:19:23 -05:00
Andrew Kelley
481ce7361e
bump version to 0.7.0 => 0.7.1
...
The official tag is in the 0.7.x branch.
2020-12-13 12:53:31 -07:00
LemonBoy
d9e9390550
Fix compilation error on OpenBSD
2020-12-13 20:36:47 +01:00
LemonBoy
bb72b0e800
Fix compilation error on FreeBSD
2020-12-13 20:36:34 +01:00
LemonBoy
561565fa81
stage1: Fix crash in can_mutate_comptime_var_state
...
No lazy value can mutate global state, no need to resolve them.
Closes #7426
2020-12-13 20:27:04 +01:00
LemonBoy
97ba3d9a66
std: Drop struct prefixes in FreeBSD siginfo
...
I'm not sure this prefix-free style is a good idea, but let's roll with
it for the moment.
2020-12-13 19:45:11 +01:00
Alex Cameron
7515922907
Fix Sigaction struct on FreeBSD.
2020-12-13 19:37:13 +01:00
LemonBoy
3a759fdb17
Disable sigaction test on i386 because of #7427
2020-12-13 19:35:40 +01:00
LemonBoy
3375a580be
std: Update more siginfo bits for BSDs
2020-12-13 19:28:38 +01:00
LemonBoy
fc70db5ab5
std: Fixes for siginfo test on macos
...
Xnu's sigaction() only supports fetching a limited set of sa_flags, test
SA_SIGINFO instead of SA_RESETHAND as that's supported everywhere.
Add another check to make sure SA_RESETHAND works.
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2020-12-13 19:17:04 +01:00
Andrew Kelley
4fd27719b4
Merge pull request #7406 from ifreund/dyn-musl2
...
stage2: support dynamically linking musl libc
2020-12-12 18:46:07 -05:00
Isaac Freund
1d8f33ca98
stage2: link musl dynamically by default if native
...
If targeting the native OS and the system libc is musl, link against it
dynamically by default.
2020-12-13 00:40:35 +01:00
Isaac Freund
078a64f8d9
std.CrossTarget: add isNativeAbi()
2020-12-13 00:40:35 +01:00
Isaac Freund
307d98dc35
stage2: support dynamically linking musl libc
2020-12-13 00:40:35 +01:00
Andrew Kelley
6b7ddfbafe
glibc: do not provide -lcrypt
...
glibc is dropping this functionality moving forward.
This is a partial revert of commit
97c0e1cc41c24c6cbb60117751d5b82dcd9d0e43
2020-12-12 12:42:33 -07:00
LemonBoy
629cc6cf28
std: Further siginfo refinements
...
* Define siginfo and sigaction for Darwin
* Define sigaction/handler union for maximum libc compatibility
* Minor correction to some type definitions
2020-12-12 16:44:10 +01:00
LemonBoy
1d9b28403a
std: Correct check in signal test
...
Ooops.
2020-12-12 15:34:26 +01:00
LemonBoy
beae3cea17
std: Improve sigaction interface
...
Add a smoke test to prevent regressions.
2020-12-12 13:57:25 +01:00
Andrew Kelley
d569e37cb5
std.fs.path.extension: different behavior for ending dot
...
extension("a.") now returns "." instead of "".
This matches both Python and Node.js standard library behavior as well
as my personal opinion on how this function should be defined.
Apologies for missing this in the code review.
2020-12-11 18:20:57 -07:00
Andrew Kelley
6ab5bebed1
stage2: proper file extension stripping
...
Previously it used mem.split on "." and took the first iterated item.
Now it uses fs.path.extension and strips off that number of bytes.
Closes #7404
2020-12-11 17:42:13 -07:00
Andrew Kelley
52bc1442d6
std.fs.path.extension: add additional API guarantee
...
Added:
The returned slice is guaranteed to have its pointer
within the start and end pointer address range of `path`,
even if it is length zero.
2020-12-11 17:41:34 -07:00
Andrew Kelley
1852dc7e13
Merge pull request #7098 from MasterQ32/std.fs.path.extension
...
Implements std.fs.path.extension
2020-12-11 19:32:21 -05:00