aboutsummaryrefslogtreecommitdiff
path: root/src/stage2.cpp
AgeCommit message (Collapse)Author
2020-03-27cmake: support cross compilingAndrew Kelley
2020-03-25improved handling of native system directoriesAndrew Kelley
* `-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.
2020-03-21ability to use `zig cc` as a drop-in C compilerAndrew Kelley
The basics are working
2020-03-12Remove unused static_crt_dir field from libc configdaurnimator
2020-03-12fix `zig targets` not reporting native infoAndrew Kelley
2020-03-11fix zig-cache to treat cpu-features as raw-bytesMichael Dusan
- add Stage2Target.cache_hash_len - add cache_mem(ch, ptr, len) - update call sites to use { ptr, len }
2020-02-28dynamic_linker becomes a field of std.zig.CrossTargetAndrew Kelley
2020-02-28remove special darwin os version min handlingAndrew Kelley
now it is integrated with zig's target OS range.
2020-02-28stage1: make get_native_target go through self-hostedAndrew Kelley
2020-02-28introduce operating system version ranges as part of the targetAndrew Kelley
* 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
2020-02-21remove sub-arch from stage1Andrew Kelley
2020-02-20Merge remote-tracking branch 'origin/master' into sub-architecture-annihilationAndrew Kelley
2020-02-20support -mcpu=baseline, both in stage1 and stage2Andrew Kelley
See e381a42de9c0f0c5439a926b0ac99026a0373f49 for more details. This is set up so that if we wish to make "baseline" depend on the OS in the future, it is possible to do that.
2020-02-19remove the concept of "sub-architecture"Andrew Kelley
in favor of CPU features. Also rearrange the `std.Target` data structure. * note: `@import("builtin")` was already deprecated in favor of `@import("std").builtin`. * `std.builtin.arch` is now deprecated in favor of `std.builtin.cpu.arch`. * `std.Target.CpuFeatures.Cpu` is now `std.Target.Cpu.Model`. * `std.Target.CpuFeatures` is now `std.Target.Cpu`. * `std.Target` no longer has an `arch` field. Instead it has a `cpu` field, which has `arch`, `model`, and `features`. * `std.Target` no longer has a `cpu_features` field. * `std.Target.Arch` is moved to `std.Target.Cpu.Arch` and it is an enum instead of a tagged union. * `std.Target.parseOs` is moved to `std.Target.Os.parse`. * `std.Target.parseAbi` is moved to `std.Target.Abi.parse`. * `std.Target.parseArchSub` is only for arch now and moved to `std.Target.Cpu.Arch.parse`. * `std.Target.parse` is improved to accept CPU name and features. * `std.Target.Arch.getBaselineCpuFeatures` is moved to `std.Target.Cpu.baseline`. * `std.Target.allCpus` is renamed to `std.Target.allCpuModels`. * `std.Target.defaultAbi` is moved to `std.Target.Abi.default`. * Significant cleanup of aarch64 and arm CPU features, resulting in the needed bit count for cpu feature set going from 174 to 138. * Add `std.Target.Cpu.Feature.Set.addFeatureSet` for merging feature sets together. `-target-feature` and `-target-cpu` are removed in favor of `-mcpu`, to conform to established conventions, and it gains additional power to support cpu features. The syntax is: -mcpu=name+on1+on2-off1-off2 closes #4261
2020-02-19make the CLI support depending on system headers and librariesAndrew Kelley
(include and lib search paths) The detection of native system paths is self-hosted. closes #2041
2020-02-17self-host dynamic linker detectionAndrew Kelley
2020-02-16rename libuserland to libstage2Andrew Kelley