aboutsummaryrefslogtreecommitdiff
path: root/lib/std/target.zig
AgeCommit message (Collapse)Author
2024-01-01std.Target: flattenAndrew Kelley
2024-01-01move is_libcpp_lib_name and is_libc_lib_name to std.TargetAndrew Kelley
2023-11-22std: remove meta.traitAndrew Kelley
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
2023-10-31std.builtin.Endian: make the tags lower caseAndrew Kelley
Let's take this breaking change opportunity to fix the style of this enum.
2023-10-26std.target: bump some OS max versionsMichael Dusan
- freebsd, openbsd, macos, ios, watchos, tvos
2023-10-25x86_64: pass more testsJacob Young
* 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
2023-10-20std.Target: update default Linux cross-compiling versionAndrew Kelley
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
2023-10-02illumos: fix dynamic linker pathRyan Zezeski
2023-10-02illumos does not have versionsRyan Zezeski
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.
2023-10-02Add illumos OS tagStephen Gregoratto
- 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
2023-09-30solaris: hard-code ABI and dynamic linkerRyan Zezeski
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.
2023-09-19compiler_rt: fix arm hard-float f16 abiJacob Young
Closes #16848
2023-09-19LLVM 17 std lib updates and fixesAndrew Kelley
* 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
2023-09-19update for LLVM 17 new target dataAndrew Kelley
New OSs: * UEFI * LiteOS New ABI: * OpenHOS Also update the LLD driver API wrappers.
2023-08-03std.target: mark helper functions inlinemlugg
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.
2023-08-01llvm: fix data layout calculation for experimental llvm targetsJacob Young
Closes #16616
2023-07-31std: finish cleanup up asmJacob Young
This also required implementing the necessary syntax in the x86_64 backend.
2023-07-28std.target | Remove comment referencing closed proposalZachary Raineri
Removes a comment referencing #425 which has been closed
2023-07-23llvm: fix datalayout generation for more targetsJacob Young
Closes #16482
2023-07-19llvm: fix various crashesJacob Young
2023-07-19llvm: compute data layout without help like a grownup compilerJacob Young
2023-06-24all: migrate code to new cast builtin syntaxmlugg
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
2023-06-20std.Target: c_char is unsigned on RISC-VEvan Haas
2023-06-20std.Target: Add a function for determining char signedessEvan Haas
Copied from arocc https://github.com/Vexu/arocc/blob/c1955a474270562a4640217e62c888b52c79d39e/src/target.zig#L7
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-17std: replace builtin.Version with SemanticVersionr00ster91
2023-06-17mem: rename align*Generic to mem.align*Motiejus Jakštys
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.
2023-06-15target.zig adds ps4 and ps5 type sizes.Dumitru Stavila
2023-05-26std.Target adjustmentsVeikka Tuominen
* 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
2023-05-11opencl: define size of C typesRobin Voetter
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.
2023-04-28update codebase to use `@memset` and `@memcpy`Andrew Kelley
2023-04-13add c_char typeAndrew Kelley
closes #875
2023-04-09spirv: cannot build libcRobin Voetter
SPIR-V cannot build libc, ssp, compiler-rt, etc at the time of this commit, so prevent trying to build them.
2023-04-09spirv: make genericName match target name.Robin Voetter
Changes the 'generic name' of the target to spirv, from spir-v.
2023-04-09std: add generic target for spirvRobin Voetter
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-05Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-03-31std: bump max macOS version to 13.3Jakub Konka
2023-03-16Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-03-06std: reenable vectorized code with the C backendJacob Young
2023-02-27std.Target: add xtensa to toCoffMachineAndrew Kelley
2023-02-19Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2023-02-03Merge remote-tracking branch 'origin/master' into llvm16Andrew Kelley
2023-01-31move compiler's CType logic to std.TargetAndrew Kelley
This API only depends on std.Target and is extremely useful in build scripts when populating configure files.
2023-01-31std.Target: remove workaroundAndrew Kelley
This was working around a stage1 compiler bug.
2023-01-26update CPU features to LLVM 16Andrew Kelley
2023-01-25update zig_llvm.cpp and zig_llvm.h to LLVM 16Andrew Kelley
2023-01-23target: use 16 byte alignment for 128-bit types on x86 and ofmt .ckcbanner
2023-01-04Sema: implement AVR address spacesMaciej 'vesim' Kuliński
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2023-01-02std.Target: bump semver max for BSDsMichael Dusan
- freebsd, netbsd, openbsd, dragonfly