dbubel
21823d1b5d
std.http.Server: add Request.getHeader() function ( #21625 )
2025-01-27 17:58:05 +00:00
Carter Snook
2043e8ae05
main: classify empty environment variables as unset
...
This matches existing well-specified conventions for e.g. NO_COLOR.
Closes #22380 .
2025-01-27 17:53:32 +01:00
Alex Rønne Petersen
5647dd84c1
Revert d714cf33405486d9aa707e9aee8f103a011d06e9 ( #21273 )
...
Turns out this was already fixed in #21964 .
I have no idea why GitHub showed an incorrect diff in #21273 , or how applying the diff to master was even possible, but here we are.
2025-01-26 20:52:29 -08:00
isaac yonemoto
ae5b1a9ca2
langref: fixes incorrect description of cmpxchg functions
2025-01-26 23:22:04 +01:00
melonedo
658a4a527c
Fix incompatibility with multi-config cmake generator
...
Avoid hard coding the path of zig2 relative to PROJECT_BINARY_DIR
2025-01-26 21:06:09 +01:00
bsubei
3f245616a5
link to Tuples section in Hello World docs, and give an example of an empty tuple
2025-01-26 20:53:25 +01:00
rpkak
9c45fb4b09
langref: correct return type of comptime known bitcount ops
2025-01-26 20:30:06 +01:00
injuly
d714cf3340
std.c.darwin: Fix EXC.MASK compile error ( #21273 )
2025-01-26 19:56:14 +01:00
kj4tmp@gmail.com
6255ee3d2f
fix typo in @typeName langref
2025-01-26 19:40:57 +01:00
Will Lillis
672bc8141f
fix: Only suggest try on destructure of error union if payload type can be destructured ( #21510 )
2025-01-26 19:38:07 +01:00
Fri3dNstuff
9c6d728b0c
std.meta: handle comptime fields in hasUniqueRepresentation ( #22132 )
2025-01-26 18:23:34 +00:00
Eric Joldasov
3179961854
std.Build: add more explicit error sets to some functions
...
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
2025-01-26 19:03:33 +01:00
ExeVirus
738d813619
Add zig std to langref.html ( #22360 )
2025-01-26 18:58:30 +01:00
thejohnny5
5b3eaff80d
std: check max depth for vector type in formatType
2025-01-26 18:53:11 +01:00
Enrique Miguel Mora Meza
24965af295
std.os.linux: Adding sigdelset ( #22406 )
2025-01-26 18:49:25 +01:00
Pierre Tachoire
df9fdb1861
std.net.listen: no REUSEPORT with unix socket
...
On Linux, set REUSEPORT option on an unix socket returns a EOPNOTSUPP error.
See 5b0af621c3
2025-01-26 18:40:34 +01:00
dweiller
df1cd62720
compiler-rt: ensure memcpy Element has no unused bytes
2025-01-26 07:00:24 -08:00
Meghan Denny
92b20e4216
stf: do not call xcode-select or xcrun by absolute path in darwin sdk detection
2025-01-26 09:07:39 +01:00
ziggoon
6a4986b2d6
Update LDR_DATA_TABLE_ENTRY struct
2025-01-26 03:40:17 +01:00
Matthew Lugg
3767b08039
Merge pull request #22602 from mlugg/incr-embedfile
...
incremental: handle `@embedFile`
2025-01-26 01:41:56 +00:00
Andrew Kelley
8fa47bb904
Merge pull request #22230 from alexrp/lto-stuff
...
Disable LTO by default + some LTO fixes
2025-01-25 13:17:25 -08:00
Alex Rønne Petersen
015a5e1982
std.Build: Make ofmt part of standardTargetOptions().
2025-01-25 20:39:10 +01:00
Andrew Kelley
d0d5ca2b6c
Merge pull request #22581 from jacobly0/x86_64-rewrite
...
x86_64: rewrite `@abs` on floats
2025-01-25 07:30:45 -08:00
Alex Rønne Petersen
b60e39fe8f
Compilation: Disable LTO by default.
...
LLD has too many LTO bugs, and we're dropping the LLD dependency soon anyway.
2025-01-25 14:59:02 +01:00
Alex Rønne Petersen
9f116d38b8
libtsan: Build with unwind tables like upstream.
2025-01-25 14:58:55 +01:00
Alex Rønne Petersen
46a1a15861
Compilation: Remove the _tls_index hack for MinGW.
...
No longer needed since we disable LTO for mingw32.
2025-01-25 14:58:44 +01:00
Alex Rønne Petersen
1e8b82f6b4
compiler: Rework LTO settings for some Zig-provided libraries.
...
* compiler-rt and mingw32 have both run into LLD bugs, and LLVM disables LTO for
its compiler-rt, so disable LTO for these.
* While we haven't run into any bugs in it, LLVM disables LTO for its libtsan,
so follow suit just to be safe.
* Allow LTO for libfuzzer as LLVM does.
2025-01-25 14:57:33 +01:00
Alex Rønne Petersen
afe2fed34d
link: Set machine and float ABI when invoking ld.lld and lld-link.
...
If this isn't done, LTO can completely miscompile the input bitcode modules for
certain targets where we need to explicitly set these ABIs (because LLVM's
defaults are bad).
2025-01-25 14:57:33 +01:00
Alex Rønne Petersen
cd8c92fc40
compiler: Explicitly specify ABI for arm, mips, and powerpc when talking to LLVM.
...
See 652c5151429e279f70396ee601416c87a70c1bec. Better to avoid relying on default
LLVM behavior going forward.
2025-01-25 14:56:59 +01:00
Alex Rønne Petersen
b95081209a
compiler: Explicitly specify loongarch ABI when talking to LLVM.
...
Necessary because of: dc665fa5f5
2025-01-25 14:56:59 +01:00
Alex Rønne Petersen
673544b783
compiler-rt: Pass called functions into inline asm so the compiler sees the usage.
2025-01-25 14:54:02 +01:00
Alex Rønne Petersen
35da1e1e8f
compiler-rt: Don't export __a(u)ll(div,rem) if linking libc.
...
libc provides these when targeting MSVC.
2025-01-25 13:49:21 +01:00
Alex Rønne Petersen
05a877a9a1
compiler-rt: More accurately export Windows Arm functions.
2025-01-25 13:49:21 +01:00
mlugg
fcf8d5ada2
incr-check: check compile errors against expected
...
Also modifies all incremental cases using `#expect_error` to include the
errors and notes which are expected.
2025-01-25 09:32:40 +00:00
mlugg
7ef345f342
incr-check: deal with Windows stupidity
...
The real problem here is that Git for Windows has horrendous defaults
which convert LF to CRLF. However, rather than changing this
configuration on the CI runners, it's worth supporting inexplicable CRLF
in these files so that anyone else cloning Zig on Windows doesn't get
unexpected test failures.
2025-01-25 08:57:20 +00:00
mlugg
f47b8de2ad
incremental: handle @embedFile
...
Uses of `@embedFile` register dependencies on the corresponding
`Zcu.EmbedFile`. At the start of every update, we iterate all embedded
files and update them if necessary, and invalidate the dependencies if
they changed.
In order to properly integrate with the lazy analysis model, failed
embed files are now reported by the `AnalUnit` which actually used
`@embedFile`; the filesystem error is stored in the `Zcu.EmbedFile`.
An incremental test is added covering incremental updates to embedded
files, and I have verified locally that dependency invalidation is
working correctly.
2025-01-25 06:07:08 +00:00
mlugg
5202c977d9
std: add fs.path.fmtJoin
...
This allows joining paths without allocating using a `Writer`.
2025-01-25 04:48:00 +00:00
Matthew Lugg
8ba3812eee
Merge pull request #22594 from mlugg/panic-stuff
...
compiler: yet more panic handler changes
2025-01-25 04:10:55 +00:00
Jacob Young
c7433212d1
x86_64: rewrite scalar and vector int @min and @max
2025-01-24 21:02:32 -05:00
Jacob Young
7701cfa032
x86_64: mitigate miscomp during switch dispatch
2025-01-24 20:56:11 -05:00
Jacob Young
ba82d6e83e
x86_64: fix typo and lower optimized insts
2025-01-24 20:56:11 -05:00
Jacob Young
b1fa89439a
x86_64: rewrite float vector @abs and equality comparisons
2025-01-24 20:56:11 -05:00
Jacob Young
ae3d95fc8d
x86_64: rewrite scalar float equality comparisons
2025-01-24 20:56:11 -05:00
Andrew Kelley
921725427e
Merge pull request #22596 from ziglang/pipeline
...
Compilation pipeline: repeat failed prelink tasks
2025-01-24 19:52:09 -05:00
mlugg
b6726913d3
Zcu: remove null_stack_trace
...
The new simplifications to the panic handler have eliminated the need
for this piece of memoized state.
2025-01-24 22:33:23 +00:00
mlugg
3232e59ab9
std: remove old declarations now a zig1 update has happened
2025-01-24 22:33:23 +00:00
mlugg
38b47034f7
compiler_rt: upgrade to new panic interface
2025-01-24 22:33:23 +00:00
mlugg
5a6666db55
all: update for panic.unwrapError and panic.call signature changes
2025-01-24 22:33:23 +00:00
mlugg
dd334d5ee5
stage1: update zig1.wasm
...
Oh dear, not again! Sorry, I changed the panic handler...
Signed-off-by: mlugg <mlugg@mlugg.co.uk>
2025-01-24 21:07:14 +00:00
mlugg
b0a8931690
Sema: prepare to remove ?*StackTrace argument from unwrapError and call
...
Now that we propagate the error return trace to all `callconv(.auto)`
functions, passing it explicitly to panic handlers is redundant.
2025-01-24 20:50:20 +00:00