| Age | Commit message (Collapse) | Author |
|
|
|
closes #4786
|
|
* `-isystem` instead of `-I` for system include directories
fixes a problem with native system directories interfering with zig's
bundled libc.
* separate Stage2Target.is_native into Stage2Target.is_native_os and
Stage2Target.is_native_cpu.
|
|
See #4485
|
|
|
|
|
|
|
|
|
|
The basics are working
|
|
|
|
|
|
|
|
|
|
|
|
|
|
implements #863
|
|
* Don't add an extra slot for the sentinel. Most of the code keeps using
the constant value from the type descriptor, let's harmonize all the
code dealing with sentinels.
* Properly write out sentinel values when reinterpreting pointers at
comptime.
* Allow the reading of the 0th element in a `[0:S]T` type.
|
|
Zero-length array with a sentinel may not have zero size.
Closes #4749
|
|
|
|
When building an object file from only one source file, instead of
having a two-stage cache system, we special case it and use the cache
directory that the .o file is output to as the final cache directory for
all the build artifacts.
When there are more than 1 source file, the linker has to merge objects
into one, and so the two stage approach makes sens. But in the case of
only one source file, this prevents needlessly copying the object file.
This commit fixes an issue with the previous one, where zig with cache
enabled would print a directory that actually did not have any build
artifacts in it.
|
|
|
|
Support atomic operations with bools and non power of two integers
|
|
|
|
- add Stage2Target.cache_hash_len
- add cache_mem(ch, ptr, len)
- update call sites to use { ptr, len }
|
|
|
|
|
|
|
|
|
|
The checks are now valid on types whose size is not a power of two.
Closes #2096
|
|
* Fix codegen for optional types that decay to a pointer, the type
behaves as a boolean
* Fix comptime evaluation of zero-sized arrays, always initialize the
internal array elements
Closes #4673
|
|
|
|
|
|
|
|
Closes #439
|
|
And fix most of the fallout. This also makes optional pointers not
require resolving zero bits, because the comptime value struct layout no
longer depends on whether the type has zero bits.
Thanks to @LemonBoy for the behavior test case
Closes #4357
Closes #4359
|
|
|
|
Commit edb210905dcbe666fa5222bceacd2e5bdb16bb89 caused the docs generation
to fail, because all the type information in pass1 was already freed in
`zig_llvm_emit_output`.
|
|
|
|
introduce operating system version ranges as part of the target; self-host native dynamic linker detection and native glibc version detection
|
|
* Slices from C pointers are no longer allowzero but instead insert a runtime assertion.
* Added a test, fixed code for cases with non-allowzero C pointers
* Create new type when flipping allow_zero, sometimes we get a cached value back from adjust_ptr_len.
* Added comments, changed panic message
* Added runtime safety test.
|
|
|
|
now it is integrated with zig's target OS range.
|
|
* re-introduce `std.build.Target` which is distinct from `std.Target`.
`std.build.Target` wraps `std.Target` so that it can be annotated as
"the native target" or an explicitly specified target.
* `std.Target.Os` is moved to `std.Target.Os.Tag`. The former is now a
struct which has the tag as well as version range information.
* `std.elf` gains some more ELF header constants.
* `std.Target.parse` gains the ability to parse operating system
version ranges as well as glibc version.
* Added `std.Target.isGnuLibC()`.
* self-hosted dynamic linker detection and glibc version detection.
This also adds the improved logic using `/usr/bin/env` rather than
invoking the system C compiler to find the dynamic linker when zig
is statically linked. Related: #2084
Note: this `/usr/bin/env` code is work-in-progress.
* `-target-glibc` CLI option is removed in favor of the new `-target`
syntax. Example: `-target x86_64-linux-gnu.2.27`
closes #1907
|
|
|
|
|
|
|
|
|
|
|
|
compiler
|
|
remove @bytesToSlice, @sliceToBytes from the language
|