25266 Commits

Author SHA1 Message Date
Andrew Kelley
182bec8771 Revert "std.os: adding linux's sched_setaffinity and its wrapper"
This reverts commit c7bf8bab38f8b89c1371eedb9229e00a29b5ca5b.
2023-07-31 11:01:42 -07:00
Andrew Kelley
86a5edca62 Revert "std.os: implementing sched_setaffinity wrapper for freebsd"
This reverts commit 05268bb9677ef0545cca6c788169b2707842dc8d.
2023-07-31 10:58:03 -07:00
Andrew Kelley
e1fdd21f0e Revert "std.c: add rfork for freebsd"
This reverts commit 2952fb97588fa2eb711bf84b479e959b60542192.
2023-07-31 10:57:35 -07:00
Andrew Kelley
a208c59a25 Revert "std.c: add netbsd's accept_filter_data for ACCEPT_FILTER sock opt."
This reverts commit b677b3627818edc24828f36f8269a3c3843703a1.
2023-07-31 10:57:22 -07:00
Andrew Kelley
b7e37f9ddc Revert "std.c: add ptrace for freebsd support."
This reverts commit b754068fbc7492962953068d31386d4c04e37ae5.
2023-07-31 10:57:12 -07:00
Andrew Kelley
faa6daef99 Revert "std.c: darwin's *copyfile api update."
This reverts commit 40e8c2243c139dc499298645a2b387e30ae09cba.
2023-07-31 10:57:06 -07:00
Andrew Kelley
833af381f0 Revert "std.os: add linux timer api"
This reverts commit b9d2e0e308794463db1b1acf04d76778c470a070.
2023-07-31 10:56:55 -07:00
Andrew Kelley
43162efbf4 Revert "std.c: adding ptrace for netbsd."
This reverts commit ccfb0d408d5ffb40f77a8ad1fb57f0bb854583ad.
2023-07-31 10:55:03 -07:00
Andrew Kelley
aff65e74e1 Revert "std.os: gethostname non libc linking using uname like linux"
This reverts commit f8991ba3d48a23b7c73079a017d69d3ead23d398.
2023-07-31 10:54:51 -07:00
Andrew Kelley
9d798ead63 Revert "std.c: fix freebsd's CPU_ISSET call"
This reverts commit 768965788ecb9a0a70b4363f9472471bb0bbe5ec.
2023-07-31 10:54:45 -07:00
Andrew Kelley
1b9ffa0824 Revert "std.Thread: refining stack size from platform minimum, changes more targetted towards platform like Linux/musl (#15791)"
This reverts commit 41502c6aa53a3da31b276c23c4db74db7d04796b.
2023-07-31 10:54:35 -07:00
Andrew Kelley
ba3b352891 Revert "std.os: fix uname usage."
This reverts commit 138f1253deb48434af707ec5e9124e889520be08.
2023-07-31 10:52:12 -07:00
Andrew Kelley
9f20d01cfb Revert "std.c: exposing timer api"
This reverts commit 54ea0bbcdddc9e13ed98415d8883f03d59392509.
2023-07-31 10:51:44 -07:00
Andrew Kelley
8e9a33b82c Revert "Merge pull request #15867 from devnexen/haiku_malloc_usable_size"
This reverts commit 3ef91233caf2c637797d84527a4e78f870e4b4b9, reversing
changes made to 2839e35d1c06ca5b6bda1f20ae870f2b2fbbbfb1.
2023-07-31 10:50:48 -07:00
Andrew Kelley
dad7eea8d9 Revert "std.c: update netbsd/openbsd mman constants"
This reverts commit 64f0059cd33b571d6cf91df45f4cb2e0af9c0742.
2023-07-31 10:50:39 -07:00
Andrew Kelley
643c986838 Revert "std.c: freebsd fix typo for PROC.PROCCTL_MD_MIN constant."
This reverts commit e9dd0a22f0d93683f97db747be53d8d2d21c3543.
2023-07-31 10:50:27 -07:00
Andrew Kelley
004711310a Revert "std.c: fix host_basic_info definition for darwin."
This reverts commit ea1d64dae4bb34d62e9cfddf7e3da493ed8063e9.
2023-07-31 10:50:22 -07:00
Andrew Kelley
381704dd0e Revert "std.c: fix few capcisum api calls, following-up on 6ae19fa."
This reverts commit 72dd22f262353fa7d37c89c7d163e97a162abb9b.
2023-07-31 10:50:16 -07:00
Andrew Kelley
88b4ee172f Revert "std.c: few freebsd's kinfo api fixes."
This reverts commit d07149c56d202c3503c4f5505e8b003b3e161145.
2023-07-31 10:50:09 -07:00
Andrew Kelley
95e2605d30 Revert "std.c: msghdr* struct removing prefixes to match linux."
This reverts commit 8f14431bc883898aaf78cc985e2d90716187e882.
2023-07-31 10:49:57 -07:00
Andrew Kelley
66d5f391ea Revert "std.c: fix haiku's find_path signature."
This reverts commit 9e0ac4449a18677ba695f7a75342cbdb049aad52.
2023-07-31 10:49:45 -07:00
GethDW
33e4cbb20f std.Build.Step.WriteFile: fix call to nonexistent function 2023-07-31 14:23:57 +02:00
Andrew Kelley
43b8304153
Merge pull request #16446 from MasterQ32/buildsystem_rename_orgy
Build.zig rename orgy. Renames FileSource to LazyPath and others
2023-07-30 21:27:29 -07:00
Andrew Kelley
acbb6418c3 move docgen.zig to tools/ 2023-07-30 18:44:31 -07:00
Andrew Kelley
25a9487caa std.Build.LazyPath: fix resolution of cwd_relative
The callsites of getPath rely on the result being absolute so that they
can pass the path to a child process with the cwd set to the build root.
2023-07-30 18:42:08 -07:00
Andrew Kelley
bdbd617237 std.Build.Step.InstallArtifact: disable emit-h
This branch was not intended to introduce new test coverage on the
emit-h feature.

See #9698
2023-07-30 17:22:54 -07:00
Andrew Kelley
6393928d50 link: add more respect for -fno-emit-bin
closes #16347
2023-07-30 11:19:36 -07:00
Andrew Kelley
38840e2e58 build system: follow-up enhancements regarding LazyPath
* introduce LazyPath.cwd_relative variant and use it for --zig-lib-dir. closes #12685
* move overrideZigLibDir and setMainPkgPath to options fields set once
  and then never mutated.
* avoid introducing Build/util.zig
* use doc comments for deprecation notices so that they show up in
  generated documentation.
* introduce InstallArtifact.Options, accept it as a parameter to
  addInstallArtifact, and move override_dest_dir into it. Instead of
  configuring the installation via Compile step, configure the
  installation via the InstallArtifact step. In retrospect this is
  obvious.
* remove calls to pushInstalledFile in InstallArtifact. See #14943
* rewrite InstallArtifact to not incorrectly observe whether a Compile
  step has any generated outputs. InstallArtifact is meant to trigger
  output generation.
* fix child process evaluation code handling of `-fno-emit-bin`.
* don't store out_h_filename, out_ll_filename, etc., pointlessly. these
  are all just simple extensions appended to the root name.
* make emit_directory optional. It's possible to have nothing outputted,
  for example, if you're just type-checking.
* avoid passing -femit-foo/-fno-emit-foo when it is the default
* rename ConfigHeader.getTemplate to getOutput
* deprecate addOptionArtifact
* update the random number seed of Options step caching.
* avoid using `inline for` pointlessly
* avoid using `override_Dest_dir` pointlessly
* avoid emitting an executable pointlessly in test cases

Removes forceBuild and forceEmit. Let's consider these additions separately.
Nearly all of the usage sites were suspicious.
2023-07-30 11:19:32 -07:00
Felix "xq" Queißner
f8386de7ae Tries to fix Windows DLL linking. 2023-07-30 11:18:50 -07:00
Felix "xq" Queißner
ae11fba44a Rebase + two fixes. 2023-07-30 11:18:50 -07:00
Felix "xq" Queißner
35d0a49db9 Introduces Compile.forceBuild() and Compile.forceEmit(…) 2023-07-30 11:18:50 -07:00
Felix (xq) Queißner
5c01818410 Introduces Compile.getEmittedX() functions, drops Compile.emit_X. Resolves #14971 2023-07-30 11:18:50 -07:00
Felix (xq) Queißner
ce95a3b153 Build.zig rename orgy (aka: #16353). Renames FileSource to LazyPath and removes functions that take literal paths instead of LazyPath. 2023-07-30 11:18:50 -07:00
kcbanner
235e6ac05d test: fix missing _start symbol warning by linking libc in compiler_rt_panic 2023-07-30 10:55:52 -07:00
Jacob Young
6f0a613b6f
Merge pull request #16611 from xxxbxxx/packed-struct
codegen: fix various packed struct issues

Closes #16609
Closes #15337
2023-07-29 23:49:14 -04:00
Frank Denis
7ad4aede7a Remove obsolete comment in wasi_libc.zig
The referenced bug in LLD has been fixed:
https://reviews.llvm.org/D85567
2023-07-29 20:33:29 -07:00
Evan Haas
9b5586ab7c add behavior test for vector bitcast at comptime
closes #8184
2023-07-29 18:08:47 -07:00
Loris Cro
f5239677e2 autodoc: implement typeof support in new rendering system 2023-07-29 19:07:23 +02:00
Jacob Young
dc8a80a191 llvm: support read-write output constraints in assembly
Closes #15227
2023-07-29 09:49:04 -07:00
Andrew Kelley
b8dda2dbe1
Merge pull request #16594 from squeek502/windows-sdk-com
windows_sdk.zig: Reinstate COM ISetupEnumInstances logic
2023-07-29 09:47:39 -07:00
AdamGoertz
796927b900
Allow zero-sized fields in extern structs (#16404)
This change allows the following types to appear in extern structs:
* Zero-bit integers
* void
* zero-sized structs and packed structs
* enums with zero-bit backing integers
* arrays of any length with zero-size elements
2023-07-29 12:45:01 -04:00
Xavier Bouchoux
8c367ef99a codegen: fix access to byte-aligned nested packed struct elems
When acessing a packed struct member via a byte aligned ptr (from the optimisation in Sema.structFieldPtrByIndex())
the codegen must apply the parent ptr packed_offset in addition to the field offset itself.

resolves https://github.com/ziglang/zig/issues/16609
2023-07-29 18:16:13 +02:00
Jacob Young
8d1805f81c behavior: add coverage for no longer reproducing issue
Closes #14305
2023-07-29 09:00:23 -07:00
Xavier Bouchoux
46abf20454 llvm: partial fix of store undefined to packed result location
prefer marking too few undefined bits, rather than too many that may overwrite nearby values.
partially resolves https://github.com/ziglang/zig/issues/15337
2023-07-29 11:56:27 +02:00
Ryan Liptak
41aaf1e6e8 windows_sdk: Get the latest installed version when using COM
Before, iteration would stop whenever an installation with vcruntime.lib was found, but that may not be the most recent installed version. Instead, we now iterate all installed instances and choose the one with the newest version.
2023-07-28 23:36:04 -07:00
mlugg
417b92f085 package manager: don't show progress indicator on dumb terminals
This mirrors the behavior of the progress indicator for the actual
compilation. Not doing this was causing sporadic CI failures due to the
(non-existent) fetches taking long enough to appear in stderr.
2023-07-28 21:45:00 -07:00
Jacob Young
e8e9a4ac66 Build: use optionals again
Closes #14952
2023-07-28 21:43:07 -07:00
xdBronch
2826f78a61
suggest using else when '_' is used for exhaustive enums (#16583) 2023-07-28 22:28:55 -04:00
Andrew Kelley
bde6e075df
Merge pull request #16593 from jacobly0/c-abi
Fix various C ABI issues
2023-07-28 19:27:43 -07:00
Ryan Liptak
8579f720b0 windows_sdk.zig: Reinstate COM ISetupEnumInstances logic
The C++ version of this code used this logic, and it turns out it is able to find some setups that the current registry/Vs7 methods cannot.

For example, if only the "Build Tools for Visual Studio" are installed but not Visual Studio itself, then only the ISetupEnumInstances method seems to find it.

Follow up to #15657, fixes a regression caused by moving from the C++ version to the Zig version
2023-07-28 19:19:32 -07:00