| Age | Commit message (Collapse) | Author |
|
|
|
|
|
In general, I don't like the idea of std.meta.trait, and so I am
providing some guidance by deleting the entire namespace from the
standard library and compiler codebase.
My main criticism is that it's overcomplicated machinery that bloats
compile times and is ultimately unnecessary given the existence of Zig's
strong type system and reference traces.
Users who want this can create a third party package that provides this
functionality.
closes #18051
|
|
Let's take this breaking change opportunity to fix the style of this
enum.
|
|
- freebsd, openbsd, macos, ios, watchos, tvos
|
|
* 128-bit integer multiplication with overflow
* more instruction encodings used by std inline asm
* implement the `try_ptr` air instruction
* follow correct stack frame abi
* enable full panic handler
* enable stack traces
|
|
Currently, Zig uses the oldest Debian release that is still under LTS
for the default version minimum. This is now Debian 10 (Buster), with
long-term support until 2024-06-30.
Debian Buster uses Linux 4.19 and glibc 2.28.
For the default version maximum, Zig uses the newest stable Linux
version, which is currently 6.5.7.
Citations:
* https://www.debian.org/News/2019/20190706
* https://packages.debian.org/source/buster/glibc
* https://kernel.org/
Previous update commit: 1530203c804db7e5abd7d6eac05cfbe449d30aea
|
|
|
|
The 5.11 in uname is not something that is ever updated. There is no
versioning of the illumos system in general. Illumos prefers to rely
on feature detection.
I can't say what Solaris does these days as I do not work at Oracle;
so I left it alone.
|
|
- Adds `illumos` to the `Target.Os.Tag` enum. A new function,
`isSolarish` has been added that returns true if the tag is either
Solaris or Illumos. This matches the naming convention found in Rust's
`libc` crate[1].
- Add the tag wherever `.solaris` is being checked against.
- Check for the C pre-processor macro `__illumos__` in CMake to set the
proper target tuple. Illumos distros patch their compilers to have
this in the "built-in" set (verified with `echo | cc -dM -E -`).
Alternatively you could check the output of `uname -o`.
Right now, both Solaris and Illumos import from `c/solaris.zig`. In the
future it may be worth putting the shared ABI bits in a base file, and
mixing that in with specific `c/solaris.zig`/`c/illumos.zig` files.
[1]: https://github.com/rust-lang/libc/tree/6e02a329a2a27f6887ea86952f389ca11e06448c/src/unix/solarish
|
|
Solaris/illumos is multi-lib, so you can't rely on an arbitrary
executable to give you the correct dynamic linker. Besides, it's
always the same path.
|
|
Closes #16848
|
|
* some manual fixes to generated CPU features code. in the future it
would be nice to make the script do those automatically. I suspect
the sm_90a thing is a bug in LLVM.
* add liteos to various target OS switches. I know nothing about this
OS; someone will need to work specifically on support for this OS
when the time comes to support it properly in zig.
* while waiting for the compiler, I went ahead and made more
conservative choices about when to use `inline` in std/Target.zig
|
|
New OSs:
* UEFI
* LiteOS
New ABI:
* OpenHOS
Also update the LLD driver API wrappers.
|
|
This was discussed in #16597. It makes sense for most of the functions
in this file to be marked inline: many are simple helper functions so
inlining is likely a strict win, and having the return values be
comptime-known may improve userspace code in some cases by preventing it
from unintentionally checking properties of the target at runtime.
This changeset is somewhat conservative: the functions marked inline are
generally returning booleans or simple integers, and many are simple
one-line checks.
|
|
Closes #16616
|
|
This also required implementing the necessary syntax in the x86_64 backend.
|
|
Removes a comment referencing #425 which has been closed
|
|
Closes #16482
|
|
|
|
|
|
Most of this migration was performed automatically with `zig fmt`. There
were a few exceptions which I had to manually fix:
* `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten
* `@truncate`'s fixup is incorrect for vectors
* Test cases are not formatted, and their error locations change
|
|
|
|
Copied from arocc https://github.com/Vexu/arocc/blob/c1955a474270562a4640217e62c888b52c79d39e/src/target.zig#L7
|
|
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
|
|
|
|
Anecdote 1: The generic version is way more popular than the non-generic
one in Zig codebase:
git grep -w alignForward | wc -l
56
git grep -w alignForwardGeneric | wc -l
149
git grep -w alignBackward | wc -l
6
git grep -w alignBackwardGeneric | wc -l
15
Anecdote 2: In my project (turbonss) that does much arithmetic and
alignment I exclusively use the Generic functions.
Anecdote 3: we used only the Generic versions in the Macho Man's linker
workshop.
|
|
|
|
* move `ptrBitWidth` from Arch to Target since it needs to know about the abi
* double isn't always 8 bits
* AVR uses 1-byte alignment for everything in GCC
|
|
Define the size of the c types according the OpenCL specification.
Note that OpenCL does not define the size of long double. Clang generates
fp128, even though there is no extension that allows such types. The
llvm-spirv translator simply crashes.
|
|
|
|
closes #875
|
|
SPIR-V cannot build libc, ssp, compiler-rt, etc at the time of this commit, so
prevent trying to build them.
|
|
Changes the 'generic name' of the target to spirv, from spir-v.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This API only depends on std.Target and is extremely useful in build
scripts when populating configure files.
|
|
This was working around a stage1 compiler bug.
|
|
|
|
|
|
|
|
Co-authored-by: Veikka Tuominen <git@vexu.eu>
|
|
- freebsd, netbsd, openbsd, dragonfly
|