6816 Commits

Author SHA1 Message Date
Robin Voetter
12ff362654
spirv: make genericName match target name.
Changes the 'generic name' of the target to spirv, from spir-v.
2023-04-09 01:51:48 +02:00
Robin Voetter
6dc1fafe98
std: add generic target for spirv
This adds a general target for SPIR-V compilation. Previously there was not
any target machine defined for SPIR-V.

TODO is to reword the features for this target. We don't really need the full
list of capabilities in the features, we should only put a few features here
which we can actually use during code generation.
2023-04-09 01:51:47 +02:00
David CARLIER
2e2d37917d std: add FreeBSD's procctl api. 2023-04-08 18:31:01 +03:00
Nameless
fde05b10b3 tls.Client: don't read if we don't need more data 2023-04-08 03:37:05 -04:00
mateusz
0866396308
std.json: allow returning custom errors from custom stringify 2023-04-07 15:01:09 +03:00
Andrew Kelley
9f957184a1 Merge remote-tracking branch 'origin/master' into llvm16 2023-04-06 13:58:54 -07:00
alion02
8853005672 Fix crash on some Windows machines 2023-04-06 07:26:07 +02:00
Andrew Kelley
f289277599 Merge remote-tracking branch 'origin/master' into llvm16 2023-04-05 22:05:31 -07:00
jim price
3487514626 std.os: add mincore syscall
The mincore syscall is available on some UNIX like operating systems
and allows a user to determine if a page is resident in memory.
2023-04-06 00:57:23 -04:00
David CARLIER
3e467c778a std: add os_log/signpost api (sort of linux's perf event equivalent)
subset.
2023-04-06 07:31:06 +03:00
Nikita Ronja
d92b5fcfb0 Add NetBSD termios constants to std.c.netbsd 2023-04-06 03:46:44 +03:00
David CARLIER
080136e4ad std: add madvise flags to freebsd 2023-04-05 13:54:01 +03:00
David CARLIER
f86f531e9c std: add a subset of the apple's QOS api 2023-04-05 09:01:35 +02:00
Jacob Young
ad5fb4879b std: fix memory bugs
This fixes logged errors during CI based on the new GPA checks.
2023-04-05 08:23:07 +02:00
Jakub Konka
5ea6e78943
Merge pull request #15162 from jacobly0/x86_64-start
x86_64: get enough things working to enable full `start.zig` logic
2023-04-05 03:02:42 +02:00
Ganesan Rajagopal
49b56f88b9
GPA: Catch invalid frees
* GPA: Catch invalid frees

Fix #14791: Catch cases where an invalid slice is passed to free().
This was silently ignored before but now logs an error. This change
uses a AutoHashMap to keep track of the sizes which seems to be an
overkill but seems like the easiest way to catch these errors.

* GPA: Add wrong alignment checks to free/resize

Implement @Inkryption's suggestion to catch free/resize with the wrong
alignment. I also changed the naming to match large allocations.
2023-04-04 13:11:25 +03:00
David CARLIER
771d07268f std: freebsd MAP* constants update, MAP_ALIGNED_SUPER and the MAP_ALIGNED macro. 2023-04-04 12:57:16 +03:00
Jacob Young
c91929090d start: disable extra start logic on various x86_64 subtargets 2023-04-03 15:19:07 -04:00
Jacob Young
f0d13489f8 Elf: add program headers for the program header table 2023-04-03 17:45:17 +02:00
Jacob Young
fde1ec5d0e x86_64: remove returns from naked functions 2023-04-03 17:45:16 +02:00
Veikka Tuominen
a31450375e
Merge pull request #15134 from castholm/reverse-iterator
std.mem.reverseIterator: misc improvements
2023-04-02 18:06:55 +03:00
Jacob Young
83a208c355 x86_64: implement large cmp 2023-04-02 04:49:53 -04:00
Jakub Konka
a88c0b4d08 link: handle -u flag in all linkers
Also clean up parsing of linker args - reuse `ArgsIterator`.

In MachO, ensure we add every symbol marked with `-u` as undefined
before proceeding with symbol resolution. Additionally, ensure those
symbols are never garbage collected.

MachO entry_in_dylib test: pass `-u _my_main` when linking executable
so that it is not incorrectly garbage collected by the linker.
2023-04-01 14:22:44 +02:00
Carl Ã…stholm
3cd72951c0 std.mem.reverseIterator: add nextPtr() 2023-03-31 22:50:31 +02:00
Carl Ã…stholm
0bbc1ec206 std.mem.reverseIterator: accept pointer to array 2023-03-31 22:48:32 +02:00
Jakub Konka
f6845bbbc6 std: bump max macOS version to 13.3 2023-03-31 21:22:30 +02:00
Jakub Konka
349349fa01 std: simplify VirtualProtectEx and fix ntdll signature 2023-03-30 21:08:31 +02:00
Jakub Konka
ba5302c4f8 std: move ntdll wrappers to std.os.windows 2023-03-30 21:08:31 +02:00
Jakub Konka
5d387742fd coff: reimplement VirtualProtectEx using our own ntdll wrapper 2023-03-30 21:08:31 +02:00
bing
64214b1ca6
Change ordering of prep provide buffers args 2023-03-30 16:51:57 +00:00
Jakub Konka
2b80552603
Merge pull request #14771 from kcbanner/coff_dynamicbase
Allow dynamicbase to be disabled by CompileStep
2023-03-28 20:18:25 +02:00
Tw
5d63d1115f bpf: add missing *const for helper functions
Signed-off-by: Tw <tw19881113@gmail.com>
2023-03-28 14:30:12 +03:00
Jacob Young
0e5e001278 std.MultiArrayList: add set and get to Slice 2023-03-27 05:58:00 -04:00
David CARLIER
1de64dba23 std: add the VM_MAKE_TAG macro for darwin. 2023-03-26 23:56:27 +02:00
Jacob Young
65f77878b4 std: remove temporary workarounds for stage2_x86_64
These seem to work great now.
2023-03-25 21:32:55 -04:00
kcbanner
4569a28ea3 build: fixes from review 2023-03-25 16:33:25 -04:00
kcbanner
113f80bcf7 coff: change dynamicbase to default to true (to match lld), change it to pass the negation to lld, and add --no-dynamicbase
build: expose linker_dynamicbase on CompileStep and map it to emit --no-dynamicbase
2023-03-25 16:26:48 -04:00
Marc Tiehuis
37f6f7990e enable more float-parsing tests
Since removing the stage1 backend we no longer have a disagreement here.
2023-03-25 14:09:00 +02:00
Jay Petacat
fcc86832d6 std.enums.IndexedSet: Add initOne and initMany 2023-03-25 13:28:25 +02:00
tjog
f6a2b72ba8 std.process.Child: implement maxrss on Darwin
Notably the Darwin (XNU) kernel the maxrss field is number of bytes
and not kilobytes (kibibytes) like other platforms (e.g. Linux, BSD).

watchOS and tvOS are not supported because they do not have the ability
to spawn a child process. iOS is enabled but due to OS sandboxing it
should fail with a permission error.
2023-03-25 03:20:50 +01:00
Jakub Konka
f99b75360d
Merge pull request #15061 from ziglang/fix-15036
build: fix adding rpaths on darwin, improve CheckObjectStep to allow matching FileSource paths
2023-03-24 07:22:05 +01:00
Jakub Konka
3aa0a7ecdf
Merge pull request #15035 from xEgoist/windowsMaxRss
Implement getMaxRss for Windows
2023-03-24 07:16:49 +01:00
Jakub Konka
145f93ba96 build: allow for deferred FileSource matching in CheckObjectStep
Re-enable all of functionality of MachO dylib test.
2023-03-23 23:46:53 +01:00
Jakub Konka
5d2892740a build: when parsing rpaths, do not expand special runtime paths on Darwin
Special runtime paths on Darwin are: `@executable_path` and `@loader_path`.
2023-03-23 22:35:27 +01:00
Mateusz Poliwczak
4d31e3c917 std.base64: don't overflow dest with padding 2023-03-23 22:52:15 +02:00
xEgoist
8f4548dd69 fmt: lib/std/os/windows/ntdll.zig 2023-03-23 15:20:03 -05:00
xEgoist
2f5af6c972 Refactored GetProcessMemoryInfo to return VM_COUNTERS
This change allows the function to return the process memory info
directly instead of copying the result of the underlying Nt function.
2023-03-23 06:13:26 -05:00
Frank Denis
9fedecf4ab
http.Client: don't prematurely check transfer_{encoding,compression} (#15040)
Common headers in a response are:

    Content-Encoding: gzip
    Transfer-Encoding: chunked

We used to return `HttpHeadersInvalid` if a `Transfer-Encoding` header
was received while the compression was already set.

However, Transfer-Encoding may not include compression. We should
only return an error if we are setting a value that was already set.

Fixes compatibility with a bunch of websites.
2023-03-23 10:05:58 +01:00
Jakub Konka
dc6b05408a
Merge pull request #15041 from ziglang/fix-14923
macho: fix Go mislinking on aarch64-macos, and misc cleanup
2023-03-22 18:30:00 +01:00
Frank Denis
d61ac0db8c
TLS: Favor ChaCha over AES-based ciphers on CPUs without AES support (#15034)
On CPUs without AES support, ChaCha is always faster and safer than
software AES.

Add `crypto.core.aes.has_hardware_support` to represent whether
AES acceleration is available or not, and in `tls.Client`, favor
AES-based ciphers only if hardware support is available.

This matches what BoringSSL is doing.
2023-03-22 17:58:24 +01:00