Felix "xq" Queißner
3592868435
Enables parsing for '-Wl,-rpath,' in pkg-config output, allows better support for NixOS linking.
2025-03-26 23:51:58 +01:00
wooster0
27ae10afe0
linux: don't export getauxval when not required
2025-03-26 21:52:44 +01:00
Kendall Condon
f391a2cd20
Allocator.create: properly handle alignment for zero-sized types ( #21864 )
2025-03-26 21:52:12 +01:00
dweiller
172dc6c314
zig build: add env_map entries to hash for Step.Run
...
This change fixes false-positive cache hits for run steps that get run
with different sets of environment variables due the the environment map
being excluded from the cache hash.
2025-03-26 15:41:17 +01:00
Arnau Camprubí
9c857bb32d
Fix std.debug.dumpHex address offsets
2025-03-26 15:40:56 +01:00
Alex Rønne Petersen
38ececf0a7
Merge pull request #23310 from Rexicon226/fix-23309
...
big.int: return normalized results from `{add,sub}Carry`
2025-03-25 18:44:58 +01:00
Chris Clark
cb3eec285f
std.zig.Ast: Fix error case memory leak in parse()
2025-03-25 15:40:55 +01:00
godalming123
0367d46d3c
Update the documentation comment in arena_allocator.zig to be more accurate
...
Update the documentation comment in arena_allocator.zig to specify that free() is a no-op unless the item is the most recent allocation.
2025-03-25 15:24:20 +01:00
孙冰
d67bf8bde3
std.c: android bionic C supports arc4random_buf and getentropy
...
1. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/bits/getentropy.h
2. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/stdlib.h
2025-03-25 15:24:07 +01:00
Alex Rønne Petersen
7d8a556ba9
Merge pull request #23220 from samy-00007/bytesAsSlice-fix
...
Minor fix for `Allocator.remap` and `mem.bytesAsSlice` for zero-sized types
2025-03-25 15:23:08 +01:00
rpkak
1aca3dd6e0
DepTokenizer: allow space between target and colon
2025-03-24 15:31:59 +01:00
Shun Sakai
f062ec2a1a
docs(std.base64): Add references to RFC 4648
...
There are multiple implementations of Base64, but `std.base64` appears
to be based on RFC 4648, so we clarify that it is based on RFC 4648.
2025-03-24 15:31:58 +01:00
GasInfinity
a7cfc23e5a
fix(std/fmt.zig): fix overflow in fmtDurationSigned
...
fixes #23315
2025-03-24 15:31:53 +01:00
Jacob Young
7757302c3a
big.int: fix negative multi-limb shift right adjust crash
2025-03-23 21:59:12 -04:00
Jacob Young
4f47be5c6b
big.int: fix yet another truncate bug
...
Too many bugs have been found with `truncate` at this point, so it was
rewritten from scratch.
Based on the doc comment, the utility of `convertToTwosComplement` over
`r.truncate(a, .unsigned, bit_count)` is unclear and it has a subtle
behavior difference that is almost certainly a bug, so it was deleted.
2025-03-23 21:59:07 -04:00
Alex Rønne Petersen
bfc554b542
compiler: Support more GCC code models and fix the mapping to LLVM code models.
...
Closes #22517 .
2025-03-20 13:34:04 -07:00
Roman Frołow
74a79da4ec
typo: was issues -> was issued
2025-03-18 04:58:08 +01:00
Jonathan Gautheron
18b821666e
std.zig.c_translation: fix function pointer casting
2025-03-18 04:58:03 +01:00
Loris Cro
f954950485
std.Build.Watch: fix macos implementation
...
The code did one useless thing and two wrong things:
- ref counting was basically a noop
- last_dir_fd was chosen from the wrong index and also under the wrong
condition
This caused regular crashes on macOS which are now gone.
2025-03-18 04:57:31 +01:00
Elijah M. Immer
f79dacbfc4
lib/std/http/Client.zig: Ignore empty proxy environment variables ( #23223 )
...
This fixes #21032 by ignoring proxy environment variables that are
empty.
2025-03-14 21:20:55 +01:00
mlugg
af4b39395c
std.mem.Allocator.remap: fix incorrect doc comment (part 2)
2025-03-12 12:25:32 -07:00
孙冰
99b5a4f294
std.c: fix sysconf names (std.c._SC) for android api
...
c.f. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/bits/sysconf.h
2025-03-12 12:25:20 -07:00
mlugg
72775adcd0
std.mem.Allocator.remap: fix incorrect doc comment
...
Resolves : #23194
2025-03-11 11:20:46 -07:00
Alex Rønne Petersen
6d44a8cd0b
std.Target.Query: Don't append glibc version in zigTriple() if ABI isn't GNU.
2025-03-09 12:07:34 -07:00
Andrew Kelley
8e91862571
fix InstallArtifact opening empty string
...
this appears to have been a problem since 43f73af3595c3174b8e67e9f2792c3774f2192e9
2025-03-07 13:34:13 -08:00
Alex Rønne Petersen
3c924abb69
std.zig.llvm.bitcode_writer: Fix word byte order on big endian systems.
...
The bitcode format always uses little endian words. Prior to this commit, a
bitcode file produced on e.g. aarch64_be or s390x would fail to be loaded by
LLVM.
2025-03-04 17:28:03 -05:00
Andrew Kelley
1e2b3b1df9
std.Build.Step: fix missing path sep in error message
...
I have a more robust solution to this coming up in the writer interface
branch.
2025-03-03 17:18:18 -08:00
Matthew Lugg
c76f451abc
Merge pull request #22979 from mlugg/remove-legacy-coercions
...
Sema: remove legacy coercion
2025-03-03 22:18:28 +00:00
Fausto Ribeiro
edabcf6192
std.DynLib: fix proper type of chain_ptr on GnuHashSection32
...
Type is correct on GnuHashSection64 but not on 32 bit version. Change it so
use of DynLib on 32-bit archs compiles.
2025-03-03 20:01:05 +01:00
Linus Groh
3bea47883a
std.time: Make Instant.since() work on UEFI
2025-03-02 23:16:34 +00:00
Linus Groh
1a03b8c899
std.os.uefi: Fix two padding mistakes in the Time struct
...
```c
//************************************************
//EFI_TIME
//************************************************
// This represents the current time information
typedef struct {
UINT16 Year; // 1900 - 9999
UINT8 Month; // 1 - 12
UINT8 Day; // 1 - 31
UINT8 Hour; // 0 - 23
UINT8 Minute; // 0 - 59
UINT8 Second; // 0 - 59
UINT8 Pad1;
UINT32 Nanosecond; // 0 - 999,999,999
INT16 TimeZone; // —1440 to 1440 or 2047
UINT8 Daylight;
UINT8 Pad2;
} EFI_TIME;
```
2025-03-02 23:16:34 +00:00
Linus Groh
6378295b77
std.os.uefi: Fix integer overflow in Time.toEpoch()
...
Instead of thinking hard about what the actual supported maximum value
for each sub-calculation is we can simply use an u64 from hours onwards.
2025-03-02 22:58:45 +00:00
rpkak
0367d684fc
add parentheses in std.heap.page_size_min
2025-03-02 22:27:57 +01:00
Frank Denis
d8d2aa9af4
crypto.pcurves.common: generalize invert() ( #23039 )
...
The Bernstein-Yang inversion code was meant to be used only with the
fields we currently use for the NIST curves.
But people copied that code and were confused that it didn't work as
expected with other field sizes.
It doesn't cost anything to make it work with other field sizes,
that may support in the future. So let's do it.
This also reduces the diff with the example zig code in fiat crypto.
Suggested by @Rexicon226 -- Thank you!
2025-03-02 11:27:04 +01:00
Andrew Kelley
6c3cbb0c87
Merge pull request #22994 from ziglang/newhash
...
implement new package hash format: `$name-$semver-$hash`
2025-02-28 04:40:05 -05:00
Andrew Kelley
6b6c1b1b0e
Revert "Merge pull request #22898 from kristoff-it/deprecated-proposal"
...
This reverts commit dea72d15da4fba909dc3ccb2e9dc5286372ac023, reversing
changes made to ab381933c87bcc744058d25a876cfdc0d23fc674.
The changeset does not work as advertised and does not have sufficient
test coverage.
Reopens #22822
2025-02-28 01:37:10 -08:00
Alex Rønne Petersen
5c44934e20
Move the compiler's LLVM bitcode builder to std.zig.llvm.
2025-02-27 01:32:49 -05:00
Andrew Kelley
e0129b387f
std.ArrayList: delete unit test
...
tests should use the API, not only verify compilation succeeds.
2025-02-26 11:42:03 -08:00
Loris Cro
43a949ee95
fix regressed build system unit test
2025-02-26 14:41:33 -05:00
Andrew Kelley
c5aa680c88
don't inherit allowed deprecation from parent modules
...
Inheriting allow-deprecation from parent modules doesn't make too much
sense, so instead make them default to disallow unless otherwise
specified. This allows build system to avoid redundant
`-fno-allow-deprecated` args.
This makes the generated CLIs smaller, and makes zig1.wasm update not
needed.
Also represented `is_root` differently (moved to field of graph).
2025-02-26 14:41:33 -05:00
Loris Cro
25790e95f1
@deprecated: remove per-module flag in Build
...
This implementation looks at the builder of each
module in the build graph instead of storing a
boolean for each module.
2025-02-26 14:41:33 -05:00
Loris Cro
ba7cd8121d
@deprecated: add build system support
2025-02-26 14:41:33 -05:00
Loris Cro
fff8eff2bd
initial implementation of @deprecated
2025-02-26 14:41:33 -05:00
Andrew Kelley
c45dcd013b
Merge pull request #22488 from Rexicon226/ubsan-rt
...
implement a ubsan runtime for better error messages
2025-02-26 03:08:36 -05:00
mlugg
8e074f1549
std: remove dependencies on legacy coercion
2025-02-26 00:17:09 +00:00
mlugg
3fcb4408a5
AstGen: improve 'file cannot be a tuple' source location
...
Instead of just reporting this on token 0, report it on the first
tuple-like field.
2025-02-25 22:28:47 +00:00
Alex Rønne Petersen
055969b101
std.Target: Update known max OS versions.
2025-02-25 20:30:43 +01:00
Robin Voetter
d856763aca
Merge pull request #22937 from alichraghi/ali_spv
...
spirv: make test suite working again
2025-02-25 20:27:37 +01:00
Andrew Kelley
2447b87d98
std.heap.page_size_min: relax freestanding restriction
...
x86_64 and aarch64 have safe values for page_size_min
2025-02-25 11:22:33 -08:00
Andrew Kelley
faf256e429
std.mem.indexOfSentinel: don't ask the OS the page size
...
simply use page_size_min instead.
better yet, this logic would avoid depending on page size entirely...
2025-02-25 11:22:33 -08:00