Commit Graph
20168 Commits
Author SHA1 Message Date
Andrew Kelley 683ace7472 Merge remote-tracking branch 'origin/master' into llvm14 2022-07-05 21:56:55 -07:00
Andrew Kelley 6279a1d684 std: align some function pointers 2022-07-05 21:54:24 -07:00
Andrew Kelley c34392b24e std.os.linux.io_uring: work around LLVM bug
See #12014
2022-07-05 21:54:05 -07:00
Andrew Kelley d8fc8d0118 compiler_rt: work around LLVM optimizing __muloti4 to call itself
This is a workaround for
https://github.com/llvm/llvm-project/issues/56403
2022-07-05 21:28:39 -07:00
Andrew Kelley 558ad19095 disable regressed behavior tests from llvm 14
See #12012
See #12013
2022-07-05 18:50:03 -07:00
Andrew Kelley 9a5c7b4b4d Merge remote-tracking branch 'origin/master' into llvm14 2022-07-05 16:24:18 -07:00
Andrew Kelley f639cb33a9 fix expected error messages in test cases 2022-07-05 16:22:53 -07:00
Andrew Kelley 844b77e3bc remove sparc64 test case which is tripping llvm assertion
See #12011
2022-07-05 16:22:53 -07:00
Andrew Kelley e8ce1728e9 disable regressed wasm32 behavior tests from LLVM 14 2022-07-05 15:46:12 -07:00
Andrew Kelley fc7c0e07be stage2: propagate use_stage1 to sub-compilation
This makes it so that -fno-stage1 also affects compiler-rt for example.
2022-07-05 15:45:48 -07:00
Andrew Kelley 388520a40b fix behavior test which was relying on UB 2022-07-05 15:22:19 -07:00
Andrew Kelley 2ee864ca5e CLI: add support for -fno-builtin 2022-07-05 15:21:20 -07:00
Andrew Kelley 927e59d053 CI: fix wrong macos tarball 2022-07-05 15:20:12 -07:00
Jonathan Marler 93ac87c1bd Mark fstype argument to mount as optional
The fstype argument to the mount system call can be null.  To see an
example run "strace -e trace=mount unshare -m":

```
mount("none", "/", NULL, MS_REC|MS_PRIVATE, NULL) = 0
...
```
2022-07-05 15:04:31 -04:00
Cody Tapscott 86570b3e2c stage2: Fix corrupted Type when de-referencing field pointer 2022-07-05 15:02:13 -04:00
Andrew Kelley bcfc4f0ceb CI: update tarballs to LLVM 14 2022-07-04 20:12:44 -07:00
Andrew Kelley fbd6c88321 Merge remote-tracking branch 'origin/master' into llvm14 2022-07-04 17:22:36 -07:00
Andrew Kelley 6fc9f6c5f6 link.Coff: notice special windows symbols
in order to have a better default for subsystem. This brings stage2
behavior on par with stage1.
2022-07-04 17:20:01 -07:00
Andrew Kelley afe6e69e4c std.Thread: fix mutable ref of temporary
The previous code is a compile error in stage2 as well as the
upcoming lang spec.
2022-07-04 16:53:41 -07:00
Andrew Kelley 9ecc47cd7c Sema: fix intFitsInType implementation
The function did not handle comptime_int in the case of lazy_align or
lazy_size.
2022-07-04 16:52:34 -07:00
Andrew Kelley eba8892b84 Sema: resolve lazy value before hashing it for generic fn 2022-07-04 16:44:41 -07:00
Andrew Kelley ecb4293afe stage2: disable unit tests when building with stage1
They trip LLVM assertions and spirv is not needed to bootstrap. Not
important for these tests to pass with stage1.
2022-07-04 16:20:33 -07:00
Andrew Kelley f59bd2be53 Merge remote-tracking branch 'origin/master' into llvm14 2022-07-04 14:07:08 -07:00
Andrew Kelley d65e248ed1 stage2: ELF: improve error reporting when libc is missing
Future improvement: make plain error notes actually render as notes
rather than errors, but keep them as errors for the case of
sub-compilation errors, e.g. when compiler-rt has compilation errors.
2022-07-04 14:06:20 -07:00
Andrew Kelley 9c5056788f std: update bsd bits to new fn ptr semantics 2022-07-04 13:02:30 -07:00
Andrew Kelley e3274067f8 update macOS libc headers
notably this adds copyfile.h

fetch-them-macos-headers rev 900567517197df46e98006c53023fa10cb986004
2022-07-04 12:14:48 -07:00
Veikka Tuominen 050fef3c23 translate-c: do not try to get rid of do while loop
It might contain breaks and continues.

Closes #11994
2022-07-04 21:56:54 +03:00
Andrew Kelley 6db190cf70 Merge remote-tracking branch 'origin/master' into llvm14 2022-07-03 22:27:21 -07:00
Andrew Kelley 314ce5465d std: better definition for std.os.linux.epoll_event
The previous definition depends on a non-lang-spec-compliant memory
layout for packed structs, which happens to trigger #11989 in stage2.

This commit changes the struct to be an extern struct with an
align(4) field. However, stage1 cannot handle this, so conditional
compilation logic is used to select different struct definitions
depending on stage1 vs stage2.

This works around #11989 but does not solve the underlying problem -
putting an extern union inside a packed struct will still trigger the
assert.

After this, both stage1 and stage2 std lib tests run assertion-clean
with a debug LLVM 13.
2022-07-03 22:18:05 -07:00
Andrew Kelley fdc24e6608 stage1: fix vectors of small int and bool tripping LLVM assertion
stage2 already has this fixed; debug info is given size in bits rather
than ABI size (bytes) multiplied by 8.

closes #11587
2022-07-03 21:08:47 -07:00
Andrew Kelley 15bdba410a update build scripts to LLD and LLVM 14 libraries 2022-07-03 18:41:43 -07:00
Andrew Kelley d588f88b1a update C headers to LLVM 14.0.6 2022-07-03 15:58:39 -07:00
Andrew Kelley cbdd21cd9a std: disable tests regressed from LLVM 14 2022-07-03 15:39:39 -07:00
Andrew Kelley b698168664 stage2: update vector alignment logic
This follows LLVM14's lead on vector alignment, which computes byte
count based on the length premultiplied by bits.

This commit also disables behavior tests regressed by LLVM 14, only for
stage1. stage2 fortunately does not trip the regression.
2022-07-03 13:33:09 -07:00
Andrew Kelley 15f111a085 LLVM: update lowering of saturating shift-left
LLVM 14 makes it so that a RHS of saturating shift left produces a
poison value if the value is greater than the number of bits of the LHS.
Zig now emits code that will check if this is the case and select a
saturated LHS value in such case, matching Zig semantics.
2022-07-03 13:07:23 -07:00
Andrew Kelley b1873f2074 LLVM: update inline asm to LLVM14 semantics
This is the equivalent of d19290e603
applied to stage2 instead of stage1.
2022-07-03 11:37:31 -07:00
Jakub Konka 5735ce39ae clang: parse --verbose flag as -v 2022-07-03 09:43:01 +02:00
Andrew Kelley fcf77e06ea libcxx: add additional include directory
It appears that libcxx files now want to additionally include based
from the src/ directory.
2022-07-02 20:41:47 -07:00
Andrew Kelley 48136c11d1 libcxx: do not include __config_site
This file contains build configuration options which zig instead
provides via command line flags.
2022-07-02 20:40:59 -07:00
Andrew Kelley f5b4b5d4cb std.zig.fmtId: revert recent changes
integer types are valid ids; we need different logic inside the
update_cpu_features tool, not to change the fmtId function.
2022-07-01 23:46:07 -07:00
Andrew Kelley c8a00c4b02 update clang command line options to LLVM 14 2022-07-01 22:36:51 -07:00
Andrew Kelley 3ab5912eee LLD: the driver functions now return "false" to mean "error" 2022-07-01 22:13:30 -07:00
Andrew Kelley ae0b0729fc LLD: there are fewer libraries to link against now 2022-07-01 22:13:12 -07:00
Andrew Kelley d55d98919d update CPU features to LLVM 14
Notable changes:

`_i386`, `_i486`, and `_i686` are renamed to `i386`, `i486`,
and `i686` respectively. `std.zig.fmtId` is enhanced to support
formatting `i386` as `@"i386"`.

Some CPU features which are actually CPU models have been
properly flattened, such as `apple_a12`, `apple_a13`, `apple_a7`,
`cortex_a78c`, `exynos_m4`, `neoverse_e1`, `neoverse_n1`,
`neoverse_n2`, `neoverse_v1`.

Some CPU features have been added and some have been removed, following
LLVM's lead.

CSky CPU features support is added.
2022-07-01 21:35:19 -07:00
Andrew Kelley d19290e603 stage1: update inline asm outputs to LLVM 14
LLVM pointers are transitioning to no longer have types, however, inline
assembly inputs and outputs which accept pointers need to know the
element type. So, inline assembly must be upgraded to add
elementtype(<ty>) annotations.
2022-07-01 20:11:06 -07:00
Andrew Kelley 1fa4a58d2c stage1: update to LLVM 14 API 2022-07-01 19:19:13 -07:00
Andrew Kelley 41a0b81731 CMake: disable deprecated function warnings
LLVM 14 deprecated a bunch of C API functions in preparation for opaque
pointer changes. However, they did not actually implement opaque pointer
semantics, so the deprecations are largely masturbatory. I have nothing
against masturbation, I am just busy trying to get the self hosted
compiler done for 0.10.0, so we will come back to this later.
2022-07-01 19:17:09 -07:00
Andrew Kelley ceb3819c42 update libunwind to llvm 14.0.6 2022-07-01 16:39:31 -07:00
Andrew Kelley aa964bd555 update libcxxabi to llvm 14.0.6 2022-07-01 16:39:29 -07:00
Andrew Kelley bd680139d0 update libcxx to llvm 14.0.6 2022-07-01 16:31:47 -07:00