Commit Graph

58 Commits

Author SHA1 Message Date
Andrew Kelley
47d5bf2616 update zig1.wasm
Needed due to the breaking changes to `@splat` which are used by the
self-hosted compiler.

This update also includes the improvement that allows casting builtins
to infer the result type through optionals and error unions.
2023-07-12 15:50:57 -07:00
Jacob Young
78eb3c5617 bootstrap: support aarch64 in 32-bit mode
* `CMakeLists.txt`: support the weird `uname -m` output.
 * `CMakeLists.txt`: detect and use the C compiler's default arm mode.
 * cbe: support gcc with both `f128` and `u128` emulated.
 * std.os.linux.thumb: fix incorrectly passed asm inputs.
2023-07-04 15:47:07 -07:00
mlugg
21ac0beb43 update zig1.wasm
Needed due to the breaking changes to casting builtins, which are used
by the compiler when building itself.

Note from Andrew: I re-ran update-zig1 on my PC and replaced this
commit.

Signed-off-by: Andrew Kelley <andrew@ziglang.org>
2023-06-24 16:56:54 -07:00
Eric Joldasov
a4d1edac8d stage1: update zig1.wasm after renaming "@XtoY" to "YfromX"
Note from Andrew: I re-ran update-zig1 on my pc and replaced this
commit.

Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Signed-off-by: Andrew Kelley <andrew@ziglang.org>
2023-06-19 12:45:01 -07:00
mlugg
22c6b6c9a9 Update zig1.wasm
This is needed in order to remove math.{min,max} from std in favour of
the builtins, since the builtins need the behavior fix from the previous
commit.

Note from Andrew: I updated this commit with zig1.wasm built by me.

Signed-off-by: Andrew Kelley <andrew@ziglang.org>
2023-06-16 13:43:32 -07:00
Andrew Kelley
f52189834c rename omit_pkg_fetching_code to only_core_functionality
No functional changes. This renames an internal build option to better
reflect how it is used.
2023-05-17 16:00:24 -07:00
Andrew Kelley
ab086b62cf update zig1.wasm
Looks like I might have messed up the wasm kernel in my recent branch causing some sporadic failures on the CI.

This file was built the following way:

1. check out d0311e28b3
2. do the cmake bootstrap
3. check out 57ea6207d3
4. `zig build update-zig1` and stash those modified files
5. check out 440b3df702 (master)
6. do the cmake bootstrap
7. `zig build update-zig1` to produce this commit
2023-04-30 10:54:20 -07:00
Andrew Kelley
fa200ca0ca update zig1.wasm
This is needed because bug fixes to the C backend are required in order
to actually update the standard library and compiler sources to use the
new `@memcpy` and `@memset` semantics.
2023-04-28 13:29:39 -07:00
Andrew Kelley
a8de15f66a update zig1.wasm
Needed due to the compiler depending on standard library APIs such as
ArrayList that contain `@memset` and `@memcpy` calls in them. The number
of parameters changed, so this is necessary for the compiler to build.
2023-04-25 11:23:41 -07:00
Andrew Kelley
3878586821 update zig1.wasm 2023-04-23 13:33:20 -07:00
Andrew Kelley
e2fe1907ec add c_char type
closes #875
2023-04-13 02:47:16 -04:00
Andrew Kelley
aa45854ec3 zig.h: fix typo for zig_trap definition 2023-04-08 09:54:32 -07:00
Andrew Kelley
ef5afbfcf4 zig.h: f16 fix for compiler_rt
See #15092
2023-04-06 08:40:02 -07:00
Andrew Kelley
eb19f73af5 update zig1.wasm 2023-04-05 23:27:50 -07:00
Andrew Kelley
1ed569e0b2 Merge remote-tracking branch 'origin/master' into llvm16 2023-03-16 17:33:24 -07:00
Lavt Niveau
5a26d1b426
Include signal.h to define SIGTRAP in Stage 1 compiler (#14867)
copy lib/zig.h to stage1/zig.h

In this case, it looks safe to backport over with no changes.

Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2023-03-10 13:36:43 +00:00
Jacob Young
e3cf9d1650 Module: rewrite zir caching logic
Multiple processes can sit waiting for the exclusive lock at the same
time, so we want to recheck whether it needs to be updated whenever
we get an exclusive lock.

This also fixes a race condition between one process truncating the
cache file and another process reading it without atomic locking.
2023-03-08 00:00:52 -05:00
Andrew Kelley
cdb9cc8f6b update zig1.wasm 2023-03-05 17:29:28 -07:00
Andrew Kelley
d399f8a489 Merge remote-tracking branch 'origin/master' into llvm16 2023-02-27 16:10:48 -07:00
Andrew Kelley
c9e02d3e69
Merge pull request #14691 from jacobly0/ctype 2023-02-22 11:06:13 -05:00
Jacob Young
3eed197c95 CBE: use stdint.h types instead of zig_ prefixes
This requires manual defines before C99 which may not have stdint.h.

Also have update-zig1 leave a copy of lib/zig.h in stage1/zig.h, which
allows lib/zig.h to be updated without needing to update zig1.wasm.
Note that since the object already existed with the exact same contents,
this completely avoids repo bloat due to zig.h changes.
2023-02-20 23:59:48 -05:00
mlugg
09a84c8384
Update std.Build to new module CLI, update zig1 and CMakeLists
Resolves: #14667
2023-02-21 01:59:37 +00:00
Andrew Kelley
b5b634e4e8 Merge remote-tracking branch 'origin/master' into llvm16 2023-02-19 10:20:19 -07:00
Andrew Kelley
5fc6bbe71e update zig1.wasm 2023-02-18 19:20:19 -07:00
Andrew Kelley
efdc94c107 Merge remote-tracking branch 'origin/master' into llvm16 2023-02-18 09:33:27 -07:00
Veikka Tuominen
7199d7c777 split @qualCast into @constCast and @volatileCast 2023-02-15 01:43:57 +02:00
Andrew Kelley
fab9b7110e Merge remote-tracking branch 'origin/master' into llvm16 2023-02-03 12:49:40 -07:00
Veikka Tuominen
f3bb1957fa update zig1.wasm to include @qualCast 2023-01-30 18:55:58 +02:00
kcbanner
a9b68308b9 cbe: fixes for tls, support for not linking libc, and enabling tests
- cbe: Implement linksection support, to support TLS when not linking libc
- cbe: Support under-aligned variables / struct fields
- cbe: Support packed structs (in the C definition of packed)
- windows: Fix regression with x86 _tls_array
- compiler_rt: Add 128-bit atomics to compiler_rt
- tests: Re-enable threadlocal tests on cbe+windows, and llvm+x86
- tests: Re-enable f80 tests that now pass
- ci: change windows ci to run the CBE behaviour tests with -lc, to match how the compiler is bootstrapped
- update zig1.wasm
2023-01-29 15:04:13 -05:00
Andrew Kelley
0ca3582a86 update CPU features to LLVM 16 2023-01-26 16:36:14 -07:00
kcbanner
c7a9c28310 update zig1.wasm 2023-01-23 13:48:37 -05:00
Andrew Kelley
876ab99f5c disable package manager code when bootstrapping
This makes building from source go faster and avoids tripping over
unimplemented things in the C backend.
2023-01-11 15:39:49 -08:00
Andrew Kelley
23b1544f6c update zig1.wasm for MSVC compatibility 2023-01-02 14:09:26 -07:00
Veikka Tuominen
b7730c7478 update zig1.wasm to overflow arithmetic builtin changes 2022-12-27 15:13:14 +02:00
Veikka Tuominen
2a5e1426aa update zig1.wasm to builtin.Type field changes 2022-12-18 13:31:38 +01:00
Veikka Tuominen
51ed5416ab update zig1.wasm to @call changes 2022-12-13 13:14:20 +02:00
Andrew Kelley
d10fd78d46 update zig1.wasm
This includes the latest changes from master branch with fixes to the C
backend that affect aarch64-windows which are necessary to build from
source on this target.
2022-12-10 16:28:49 -07:00
Veikka Tuominen
89d1ccc477 replace zig1.wasm to the removal of BoundFn
This also no longer uses zstd compression on this file. The reasoning
for this is:

 * It has been demonstrated that the release tarballs are actually
   smaller if zig1.wasm gets compressed along with the other files
   rather than separately compressed.

 * More importantly, leaving zig1.wasm uncompressed may result in a
   smaller git repository size, since the repository as a whole could
   have savings across the multiple versions of zig1.wasm, which would
   not be possible if each one was independently compressed.

 * When in doubt, do what is simpler, which is to not have this extra
   zstd mechanism. This will remove the only "vendored" code from our
   build process, which is a nice property to have.

Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2022-12-09 20:59:13 -07:00
Andrew Kelley
c51288f1f6 remove the zstd mechanism from the build process 2022-12-09 20:59:13 -07:00
Jacob Young
6966fb8ca5 wasm2c: reuse locals
* Reduce stack usage of a -O0 build of zig1 by 33%.
 * Avoid compiler builtin calls.
2022-12-09 03:45:29 -05:00
Andrew Kelley
9627018d0c build: obtain zigcpp library prefix/suffix from cmake 2022-12-07 01:44:15 -07:00
Andrew Kelley
20d86d9c63 add zig1.wasm.zst
This commit adds a 637 KB binary file to the source repository. This
commit does nothing else, so it should be replaced with a different
commit before this branch is merged to avoid bloating the git
repository.
2022-12-06 12:27:28 -07:00
Jacob Young
3683602226 wasm2c: improve amortized speed of memory.grow 2022-12-06 12:27:28 -07:00
Jacob Young
793db27805 wasi: add support for windows paths 2022-12-06 12:27:28 -07:00
Jacob Young
5dbd28f171 wasm2c: support memory.copy with overlapping buffers 2022-12-06 12:15:05 -07:00
Jacob Young
9f4ef4de23 wasm2c: remove unnecessary brackets to reduce max bracket depth
This avoids the need to pass `-fbracket-depth=512` to clang.
2022-12-06 12:15:04 -07:00
Jacob Young
ce4e5fee63 wasm2c: avoid aliasing issues on memory access 2022-12-06 12:15:04 -07:00
Jacob Young
e000db2782 wasi: implement file truncation
The way this is implemented destroys the contents of the file, so
revisit if this causes issues in the future.
2022-12-06 12:15:04 -07:00
Jacob Young
1263346774 use zig-wasm2c for bootstrapping 2022-12-06 12:15:04 -07:00
Andrew Kelley
9b8cf13c00 zig1.c: remove executable bit
This was set on accident.
2022-12-06 12:15:04 -07:00