20684 Commits

Author SHA1 Message Date
Cody Tapscott
94945864b9 Type.zig: Add nvcl/cuda CType definitions 2022-10-21 20:16:00 -07:00
Cody Tapscott
f0e66ac4d0 std.Target: Remove longDoubleIs
This function is redundant with CType.sizeInBits(), and until the
previous commit they disagreed about the correct long double type
for several targets. Although they're all synced up now, it's much
simpler just to have a single source of truth.
2022-10-21 19:20:58 -07:00
Cody Tapscott
ddbdb83c86 stage 2: Update C types' size/alignment
These updates were made by testing against the `sizeof/_Alignof` reported
by Clang for all supported arch-OS-ABI combinations and correcting any
discrepancies.

This is bound to have a few errors (the recent long double fix for i386
Android is one example), but Clang is certainly not a bad place to start,
especially for our most popular targets.
2022-10-21 19:11:47 -07:00
Louis Pearson
8d4778b4f9
Support compiling for the android NDK (#13245) 2022-10-21 18:32:56 -04:00
Andrew Kelley
3b2f0c3eee Revert "ci: make directory structure in releases consistent"
This reverts commit 28054d96f0ed5280660811612732cb000f9c09e8.

This caused CI failures.
2022-10-21 13:18:37 -07:00
Eric Joldasov
28054d96f0 ci: make directory structure in releases consistent 2022-10-21 12:51:04 -04:00
David Gonzalez Martin
680d3cd1fc UEFI: Querying memory map size with no allocation
This makes possible to query the memory map size from EFI firmware
without making any allocation beforehand. This makes possible to be
precise about the size of the allocation which will own a copy of
the memory map from the UEFI application.
2022-10-21 12:17:41 +02:00
Veikka Tuominen
972c39e2c0
Merge pull request #13219 from Vexu/stage2-fixes
Stage2 bug fixes
2022-10-21 12:11:49 +02:00
Joachim Schmidt
41575b1f55
Merge pull request #13236 from joachimschmidt557/stage2-aarch64
stage2 AArch64: move to new allocRegs mechanism
2022-10-21 09:17:56 +02:00
Andrew Kelley
0f00766661 Revert "add std.debug.todo"
This reverts commit 80ac022c4667e1995ccdf70fff90e5af26b6eb97.

I changed my mind on this one, sorry. I don't think this belongs in the
standard library.
2022-10-20 18:34:40 -07:00
Veikka Tuominen
2609e33ab0 make C ABI tests compile on arm, mips and riscv
x86_64      24/25
x86         15/25
aarch64     25/25 - all
arm         18/25
mips        10/24
riscv64     13/25
wasm32      25/25 - all
2022-10-20 20:11:12 +03:00
Veikka Tuominen
646d927c79 stage2: fix handling of aarch64 C ABI float array like structs
Closes #11702
Closes #13125
2022-10-20 20:11:12 +03:00
Veikka Tuominen
07b6173cb8 delete failing recursive test
Don't forget to add these back when solving #12973
2022-10-20 20:11:12 +03:00
Veikka Tuominen
7e946bc790 make C ABI tests compile on i386 2022-10-20 20:11:12 +03:00
Veikka Tuominen
51491186cb stage2: fix x86_64 C ABI of struct with array member
Closes #12185
2022-10-20 20:11:12 +03:00
Veikka Tuominen
ce95cc170b Value: handle runtime_int in hashPtr
Closes #12702
2022-10-20 20:11:12 +03:00
Veikka Tuominen
9a52abf3b4 Sema: add missing calls to wip_captures.finalize
Closes #13171
2022-10-20 20:11:12 +03:00
Veikka Tuominen
3b60a6de2f Sema: fix using runtime instructions inside typeof in comptime only blocks
Closes #13210
Follow up to 3ccd4907fbcd04ecddffb618a4b14581fd080279
2022-10-20 20:11:12 +03:00
Veikka Tuominen
c95a34b68f stage2: improve source location of assignment 2022-10-20 20:11:00 +03:00
Veikka Tuominen
34e4b07d0c Sema: allow runtime only instructions to be emitted in outside functions
It is possible to get comptime-known values from runtime-known values
for example the length of array. Allowing runtime only instructions to
be emitted outside function bodies allows these operations to happen.
In places where comptime-known values are required we have other methods
to ensure that and they usually result in more specific compile errors too.

Closes #12240
2022-10-20 20:11:00 +03:00
Veikka Tuominen
13897be0ab Type: bitSizeOf non-packed structs should include padding
Closes #13214
2022-10-20 20:11:00 +03:00
Andrew Kelley
5b9c8d1d6f add m68k target CPU features 2022-10-20 09:21:06 -07:00
joachimschmidt557
67941926b2
stage2 AArch64: Remove remaining legacy binOp code 2022-10-20 16:14:52 +02:00
joachimschmidt557
dd62d5941e
stage2 AArch64: move remaining operations out of binOp 2022-10-20 16:14:52 +02:00
joachimschmidt557
3800bb538a
stage2 AArch64: mov mul,div,mod to new allocRegs mechanism 2022-10-20 16:14:52 +02:00
joachimschmidt557
ea7a60116d
stage2 AArch64: move add+sub to new allocRegs mechanism 2022-10-20 16:14:52 +02:00
joachimschmidt557
d8fddb535c
stage2 AArch64: move cmp to new allocRegs mechanism
Remove cmp from binOp in the process
2022-10-20 16:14:52 +02:00
joachimschmidt557
5838fe89c1
stage2 AArch64: introduce ldr_ptr_stack Mir instruction 2022-10-20 16:14:52 +02:00
joachimschmidt557
230bafa1ab
stage2 AArch64: simplify allocMem 2022-10-20 16:14:52 +02:00
joachimschmidt557
151e15e444
stage2 AArch64: merge floating-point registers into Register enum 2022-10-20 16:14:50 +02:00
Matheus C. França
b41b35f578
crypto/benchmark - replace testing allocator
Fix error: Cannot use testing allocator outside of test block
2022-10-20 14:04:59 +03:00
yujiri8
a99d465f62
Fix #12091: Error message with TERM=dumb is missing info 2022-10-20 13:57:57 +03:00
Andrew Kelley
a4eb221b9e link/MachO: avoid depending on host PATH_MAX
closes #13229

Restores ability to compile zig for WASI
2022-10-19 12:20:42 -07:00
LordMZTE
3f577f06a0 build: added unwind_tables to LibExeObjStep 2022-10-19 13:24:06 -04:00
Andrew Kelley
8a344fab39
Merge pull request #13036 from BratishkaErik/fix-installing 2022-10-19 09:34:35 -04:00
Luuk de Gram
7d6596e979
Merge pull request #13218 from Luukdegram/fix-emulatable-step
std: CheckObject - correctly depend on its own step when creating an EmulatableRunStep
2022-10-19 08:36:14 +02:00
Andrew Kelley
1952dd6437 Revert recent std.Progress implementation changes
I have noticed this causing my terminal to stop accepting input
sometimes. The previous implementation with all of its flaws was better
in the sense that it never caused this to happen.

This commit has multiple reverts in it:

Revert "Merge pull request #13148 from r00ster91/progressfollowup"

This reverts commit cb257d59f97ea5655bf453d8e7f07bbfb0a88e58, reversing
changes made to f5f28e0d2c49d5c62914edf0bff8f1941eef721f.

Revert "`std.Progress`: fix inaccurate line truncation and use optimal
max terminal width (#12079)"

This reverts commit cd3d8f3a4ee22a41098b1daf2a36d7fbb342d0fa.
2022-10-18 18:53:44 -07:00
Andrew Kelley
cb635e084b stage2: better handling of CacheMode.whole on Windows
Windows gives AccessDenied if you delete a directory which contains open
file handles. This could be triggered when using CacheMode.whole when
cross compiling macho test binaries.
2022-10-18 16:52:43 -07:00
Andrew Kelley
9ee4530b9b std.os.windows.OpenFile: handle INVALID_HANDLE ntstatus 2022-10-18 16:52:43 -07:00
Andrew Kelley
c7772dd694 std.zig.system.NativePaths: avoid calling std.os.getenv on Windows 2022-10-18 16:52:43 -07:00
Andrew Kelley
caddbbc315 build: avoid compiling self-hosted twice
build.zig: add a 'compile' step to compile the self-hosted compiler
without installing it.
Compilation: set cache mode to whole when using the LLVM backend and
--enable-cache is passed.

This makes `zig build` act the same as it does with stage1. Upside is
that a second invocation of `zig build` on an unmodified source tree
will avoid redoing the compilation again. Downside is that it will
proliferate more garbage in the project-local cache (same as stage1).

This can eventually be fixed when Zig's incremental compilation is more
robust; we can go back to having LLVM use CacheMode.incremental and rely
on it detecting no changes and avoiding doing the flush() step.
2022-10-18 16:52:43 -07:00
Eric Joldasov
1013212697 cmake: separate installing and building (again) 2022-10-18 16:52:43 -07:00
Veikka Tuominen
4aaff75c81 Sema: resolve tuple default values before hashing
Closes #12488
2022-10-19 01:38:19 +03:00
Veikka Tuominen
6582896ee0 Sema: remove unresolved inferred allocs
Closes #2557
2022-10-19 01:38:19 +03:00
Veikka Tuominen
4e134f6dcb Sema: respect inline call semantics
If an argument is comptime-known but shouldn't be create an alloc
to store it in to get a runtime-known value.
2022-10-19 01:38:18 +03:00
Andrew Kelley
14c173b200 ci: windows: update tarball
This has the `@max`/`@maximum`, `@min`/`@minimum` update.
2022-10-18 15:30:44 -07:00
Andrew Kelley
4f9345d20b Revert "adding static and dynamic ZigEquivalent
enums so that we can branch to set `link_mode` properly when we iterate
over the clang arguments. also replaced `dynamic` flag in
clang_options_data.zig with proper definition similarly to `static`."

This reverts commit 6af0eeb58d1d220d407ce4c463eaeb25b35f2761.

This change needs more careful consideration. It regressed
zig-bootstrap due to cmake passing `-static -lkernel32` and zig failing
with error.UnableToStaticLink.

See https://github.com/ziglang/zig-bootstrap/issues/134
2022-10-18 14:16:07 -07:00
Andrew Kelley
b120c819db
Merge pull request #13055 from alichraghi/m2m
all: rename `@maximum` to `@max` and `@minimum` to `@min`
2022-10-18 14:42:55 -04:00
Andrew Kelley
4962f36b0f synchronize target CPU features with LLVM 15.0.3 2022-10-18 10:18:09 -07:00
Andrew Kelley
7c7d9e13d7 Sema: fix runtime int to enum with one possible value 2022-10-18 10:18:09 -07:00