15838 Commits

Author SHA1 Message Date
Andrew Kelley
cfdb001a8f
Merge pull request #22099 from Rexicon226/fix-cat-mul
change `++` and `**` to not return mutable pointers
2024-11-29 15:05:49 -05:00
David Rubin
1d78d4f8c1
sema: hotpath ++ and ** for array-pointers 2024-11-28 18:05:36 -08:00
Alex Rønne Petersen
8594f179f9
Merge pull request #22067 from alexrp/pie-tests
Add PIC/PIE tests and fix some bugs + some improvements to the test harness
2024-11-28 14:07:28 +01:00
David Rubin
bc3094b278
sema: make ++ and ** return immutable pointers 2024-11-27 20:39:23 -08:00
Justin Braben
d16a9b0acb
std.os.windows: Map PIPE_NOT_AVAILABLE from OpenFile() to error.NoDevice (#21938) 2024-11-27 22:33:29 +01:00
Andrew Kelley
11bf2d92de diversify "unable to spawn" failure messages
to help understand where a spurious failure is occurring
2024-11-26 13:56:40 -08:00
David Rubin
a6af55cc6e ip: cleanup @constCast usages 2024-11-25 18:41:36 -05:00
Jacob Young
c894ac09a3 dwarf: fix stepping through an inline loop containing one statement
Previously, stepping from the single statement within the loop would
always exit the loop because all of the code unrolled from the loop is
associated with the same line and treated by the debugger as one line.
2024-11-24 17:28:12 -05:00
Alex Rønne Petersen
24ecf45569
std.Target: Add Os.HurdVersionRange for Os.Tag.hurd.
This is necessary since isGnuLibC() is true for hurd, so we need to be able to
represent a glibc version for it.

Also add an Os.TaggedVersionRange.gnuLibCVersion() convenience function.
2024-11-24 22:11:16 +01:00
Andrew Kelley
ed8955cea6
Merge pull request #22049 from alexrp/musl-gen-stubs
`gen_stubs`: No compiler-rt hacks, more compact output, and more arch support
2024-11-23 23:50:36 -05:00
Alex Rønne Petersen
aef5c75602 compiler: Disallow align(0) everywhere in the language.
Thus leaving the design space for this alignment value open, e.g. for packing.
2024-11-23 18:44:07 -05:00
Alex Rønne Petersen
57e4fa14bb
musl: Define TIME32 and FAMILY_* macros for libc.S as appropriate.
Also adjust ARCH_* logic for the updated gen_stubs.zig tool.
2024-11-23 03:10:58 +01:00
David Rubin
66a7c09def link: use target to determine risc-v eflag validity 2024-11-22 19:34:47 -05:00
Alex Rønne Petersen
8b2b9aa019
Compilation: Consider *.lo files to be object files.
Fixes musl libc.so compilation with zig cc.
2024-11-23 01:22:20 +01:00
Shawn Gao
dafe1a910d Append disabled LLVM CPU features after enabled ones 2024-11-20 10:09:03 +01:00
xdBronch
5f3a70ed5f Fix peer type resolution with allowzero pointers 2024-11-20 02:09:50 +02:00
Alex Rønne Petersen
94be75a94f Compilation: Re-enable LTO for RISC-V. 2024-11-19 12:04:42 +01:00
Ian Johnson
dceab4502a zig fetch: handle redirects for Git packages
Closes #21976
2024-11-19 00:35:00 -08:00
Andrew Kelley
fbcb00fbb3
Merge pull request #22004 from jacobly0/fix-self-llvm
fix llvm-enabled compiler builds with the self-hosted backend
2024-11-18 16:44:12 -08:00
Alex Rønne Petersen
e6d2e16413 Compilation: Disable LTO for all ILP32-on-LP64 ABIs.
Extension of 3a6a8b8aa540413d099a6f41a0d8f882f22acb45 to all similar ABIs. The
LLD issue affects them all.
2024-11-18 19:10:14 +01:00
Alex Rønne Petersen
3a6a8b8aa5 Compilation: Disable LTO for mips n32.
See: https://github.com/llvm/llvm-project/pull/116537
2024-11-17 15:15:59 +01:00
Jacob Young
5be8a5fe5f link: fix memory bugs 2024-11-16 21:29:17 -05:00
Jacob Young
a8ec306b49 Sema: fix peer resolution alignment between slice and empty struct
An empty struct that coerces to an empty array should not force
`align(1)` on the resulting slice type.
2024-11-16 21:22:57 -05:00
Jacob Young
7266d4497e
Merge pull request #21999 from jacobly0/incr-cases
link: fix failing incremental test cases
2024-11-16 20:32:02 -05:00
Benjamin
7cc7ae1fd3
Use options debug format if it is provided (#21995)
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2024-11-16 19:32:11 +00:00
Jacob Young
11e54a3559 link: fix failing incremental test cases 2024-11-16 14:03:31 -05:00
Jacob Young
96552638ae dev: support incremental for x86_64-linux env 2024-11-16 11:49:49 -05:00
Carl Åstholm
4fc295dc02 Take eagerness into account when deduplicating dependencies
If the same dependency is first found as lazy and then later as eager,
the existing entry needs to be updated to eager in order for
`b.dependency()` to work.
2024-11-13 14:59:46 -08:00
Alex Rønne Petersen
e5d9d3f8a1 Compilation: Pass -municode on to Clang.
This is supposed to define the UNICODE macro; it's not just a linker option.

Closes #21978.
2024-11-13 14:22:45 +01:00
mlugg
9ebce51e16 compiler: un-jit zig fmt
This command being JITed leads to a substantially worse first-time user
experience, since you have to wait for upwards of 20 seconds for
`fmt.zig` to build. This is especially bad when your editor is
configured to run `zig fmt` on save and does so in a blocking manner. As
such, it makes sense from a usability perspective to not JIT this
particular command.
2024-11-12 21:55:46 -08:00
Alex Rønne Petersen
1db8cade5a
Merge pull request #21920 from alexrp/nobuiltin
compiler: Improve handling of `-fno-builtin` and compiler-rt options
2024-11-12 16:40:00 +01:00
mlugg
bbbc95afd0 AstGen: add missing rvalue call to labeledBlockExpr
...and fix a minor x86_64 backend bug exposed by this fix.

Resolves: #21974
2024-11-12 14:51:10 +00:00
Robin Voetter
62f4a6b4d8
Merge pull request #21937 from Snektron/spirv-vulkan-ptrs
spirv: miscellaneous vulkan + zig stuff
2024-11-09 21:50:33 +01:00
Wooster
35201e9d93 Sema: fix wording in error message
It's an FQN, not an actual file name.
2024-11-09 20:21:32 +00:00
Robin Voetter
9cd7b8359c
spirv: enable variable pointers for now
This seems to be required for ptr_elem_ptr with storage buffers. Note that
this does not imply that the pointer can be regarded as physical too.

Some variants of ptr_elem_ptr will need to be forbidden
2024-11-09 01:53:13 +01:00
Robin Voetter
efb7539cb6
spirv: dont emit forward pointer for annotation instructions 2024-11-09 01:53:13 +01:00
Robin Voetter
89bd987f1c
spirv: emit ArrayStride for many-item pointers 2024-11-08 20:43:57 +01:00
Robin Voetter
b16252b17e
spirv: make all vulkan structs Block for now 2024-11-08 20:43:57 +01:00
Robin Voetter
d35dfc5a3f
add storage_buffer address space 2024-11-08 20:43:57 +01:00
Robin Voetter
688d7055e3
spirv: assembler hacky constant placeholders 2024-11-08 20:43:55 +01:00
Robin Voetter
b5301558ae
spirv: make default generic address space for vulkan Function
We are not using Private variables. This needs to be cleaned up a bit
more, this will happen with the general address space improvements.
2024-11-08 20:38:23 +01:00
Robin Voetter
7682ced08e
spirv: track global OpVariables properly in assembler
Also cleans up the assembler a bit in general.
2024-11-08 20:38:22 +01:00
Robin Voetter
4fbc100959
spirv: properly resolve type inputs in assembly
For now the frontend still allows type inputs in assembly. We
might as well resolve them properly in the SPIR-V backend.
2024-11-08 20:38:21 +01:00
Robin Voetter
08ad7afc1e
spirv: forbid pointer arithmetic 2024-11-08 20:38:20 +01:00
Alex Rønne Petersen
c9052ef931
llvm: Disable lowering to f16 on sparc. 2024-11-08 14:57:16 +01:00
Alex Rønne Petersen
89a506a7ef
musl: Don't explicitly pass -fno-unwind-tables -fno-asynchronous-unwind-tables.
These are already handled by build_crt_file().
2024-11-05 22:41:09 +01:00
Alex Rønne Petersen
5685a10ded
libunwind: Pass -fPIC -funwind-tables via module options instead of CFLAGS. 2024-11-05 22:41:09 +01:00
Alex Rønne Petersen
eb14fd8806
libcxx: Pass -fPIC via module options instead of CFLAGS. 2024-11-05 22:41:09 +01:00
Alex Rønne Petersen
796d4845ff
musl: Pass -fomit-frame-pointer via CrtFileOptions. 2024-11-05 22:41:09 +01:00
Alex Rønne Petersen
7fef0b4a23
musl: Pass -f(function,data)-sections via CrtFileOptions instead of CFLAGS. 2024-11-05 22:41:09 +01:00