aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Target/Query.zig
AgeCommit message (Collapse)Author
2025-03-09std.Target.Query: Don't append glibc version in zigTriple() if ABI isn't GNU.Alex Rønne Petersen
2025-02-17std.Target: Remove functions that just wrap component functions.Alex Rønne Petersen
Functions like isMinGW() and isGnuLibC() have a good reason to exist: They look at multiple components of the target. But functions like isWasm(), isDarwin(), isGnu(), etc only exist to save 4-8 characters. I don't think this is a good enough reason to keep them, especially given that: * It's not immediately obvious to a reader whether target.isDarwin() means the same thing as target.os.tag.isDarwin() precisely because isMinGW() and similar functions *do* look at multiple components. * It's not clear where we would draw the line. The logical conclusion before this commit would be to also wrap Arch.isX86(), Os.Tag.isSolarish(), Abi.isOpenHarmony(), etc... this obviously quickly gets out of hand. * It's nice to just have a single correct way of doing something.
2025-01-16x86_64: implement clz and notJacob Young
2025-01-05std: fix undefined value in Target.Querymlugg
This is an RLS footgun. Resolves: #21834
2024-11-24std.Target: Add Os.HurdVersionRange for Os.Tag.hurd.Alex Rønne Petersen
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-06Provide a detailed message for invalid arch in target triple (#21921)Daniel Hooper
2024-11-01std.Target: Add support for specifying Android API level.Alex Rønne Petersen
2024-10-16std.Target: Rename OS version range functions to drop the "get" prefix.Alex Rønne Petersen
2024-10-16std.Target: Change Cpu.baseline() to also be able to take OS into consideration.Alex Rønne Petersen
2024-10-12std.Target.Query: fix compilation error (#21669)DravenK
closes #21668 Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2024-09-24std.Target: Introduce Abi.androideabi to distinguish the soft float case.Alex Rønne Petersen
Abi.android on its own is not enough to know whether soft float or hard float should be used. In the C world, androideabi is typically used for the soft float case, so let's go with that. Note that Android doesn't have a hard float ABI, so no androideabihf. Closes #21488.
2024-08-28std: update `std.builtin.Type` fields to follow naming conventionsmlugg
The compiler actually doesn't need any functional changes for this: Sema does reification based on the tag indices of `std.builtin.Type` already! So, no zig1.wasm update is necessary. This change is necessary to disallow name clashes between fields and decls on a type, which is a prerequisite of #9938.
2024-08-23std.Target.Query: Fix `parse` test on ABIs like `gnueabi`, `gnuabi64`, etc.Alex Rønne Petersen
The `zigTriple()` implementation simply returns `gnu` when a glibc version is provided but a more specific ABI isn't.
2024-04-18std.Build: revert --host-target, --host-cpu, --host-dynamic-linkerAndrew Kelley
This is a partial revert of 105db13536b4dc2affe130cb8d2eee6c97c89bcd. As we learned from Void Linux packaging, these options are not actually helpful since the distribution package manager may very well want to cross-compile the packages that it is building. So, let's not overcomplicate things. There are already the standard options: -Dtarget, -Dcpu, and -Ddynamic-linker. These options are generally provided when the project generates machine code artifacts, however, there may be a project that does no such thing, in which case it makes sense for these options to be missing. The Zig Build System is a general-purpose build system, after all.
2024-04-14Target: cleanupJacob Young
2024-03-13zig libc: allow non-native targetsMichael Dusan
On macos, allow targets supported by the SDK. This then spawns `xcrun` and correct paths are emitted for: - x86_64-macos - x86_64-ios - x86_64-tvos - x86_64-watchos - x86_64-ios-macbi - aarch64-macos - aarch64-ios - aarch64-tvos - aarch64-watchos - aarch64-ios-macbi On platforms with android NDK, allow android targets. Example usage: ``` CC=/NDK/.../bin/aarch64-linux-android34-clang zig libc -target aarch64-linux-android ```
2024-02-02std.Target.Query: avoid using builtin.target.abiAndrew Kelley
This value is very likely incorrect. When glibc_version is provided but no explicit ABI is provided, use the string "gnu" instead.
2024-01-01std.Target.Query: fix regression with windows os version rangeAndrew Kelley
somebody left a landmine here without even a comment to warn about it
2024-01-01std.Target.Query: remove deprecated APIAndrew Kelley
These functions have been doomed for a long time. Finally I figured out what the proper relationship between this API and std.Target is.
2024-01-01std.Target: add DynamicLinkerAndrew Kelley
2024-01-01rename std.zig.CrossTarget to std.Target.QueryAndrew Kelley