aboutsummaryrefslogtreecommitdiff
path: root/src/target.cpp
AgeCommit message (Collapse)Author
2020-07-24macOS: macho ld64.lld fixesMichael Dusan
* bring `construct_linker_job_macho` to parity with `construct_linker_job_elf` * macho now sets `-error-limit` * macho on macOS now sets `-macosx_version_min` and `-sdk_version` to `10.13` when running `zig0` * macho now detects when `-l` prefix is not needed * macho on macOS detects system libraries in a case-insensitive manner * macho now ads user-specified libraries to linker command-line args when condition `is_native_os != true` * re-ordered some macho args positions to match elf positions closes #5059 closes #5067
2020-04-04add libutil to zig's glibc supportAndrew Kelley
2020-04-01stage1: make C++ switch fallthrough an errorMichael Dusan
Make fallthrough an error when compiler supports it. This requires a new macro that is defined with such compilers to be used as a statement, at all fallthrough sites: switch (...) { case 0: ... ZIG_FALLTHROUGH; case 1: ... break; default: ... break; } If we ever move to C++17 as minimal requirement, then the macro can be replaced with `[[fallthrough]];` at statement sites.
2020-03-30linking: remove check for target_supports_libunwindAndrew Kelley
I'm not sure why this was ever there. Maybe it was working around a problem with LLVM 9. Anyway this fixes linking C++ code for 32 bit arm and riscv.
2020-03-29linking is now aware -lm is provided by mingw-w64Andrew Kelley
2020-03-27zig c++: get it working with musl and mingw-w64Andrew 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-03Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
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-25Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-21fix regression in detecting native glibc versionAndrew Kelley
closes #4519
2020-02-21remove sub-arch from stage1Andrew Kelley
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-17self-host dynamic linker detectionAndrew Kelley
2020-02-14Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-02-10stage1: memory/report overhaulMichael Dusan
- split util_base.hpp from util.hpp - new namespaces: `mem` and `heap` - new `mem::Allocator` interface - new `heap::CAllocator` impl with global `heap::c_allocator` - new `heap::ArenaAllocator` impl - new `mem::TypeInfo` extracts names without RTTI - name extraction is enabled w/ ZIG_ENABLE_MEM_PROFILE=1 - new `mem::List` takes explicit `Allocator&` parameter - new `mem::HashMap` takes explicit `Allocator&` parameter - add Codegen.pass1_arena and use for all `ZigValue` allocs - deinit Codegen.pass1_arena early in `zig_llvm_emit_output()`
2020-01-29Merge remote-tracking branch 'origin/master' into llvm10Andrew Kelley
2020-01-23update target info to llvm 10Andrew Kelley
the branch builds now
2020-01-23fix incorrect list of sub-arches for aarch64Andrew Kelley
tests use older sub-arch that works in the older qemu
2020-01-22update zig_llvm.h and zig_llvm.cpp to llvm 10Andrew Kelley
2020-01-21fix target_triple_zig to emit zig-compatible triplesAndrew Kelley
2020-01-21target_triple_llvm: emit none instead of unknownAndrew Kelley
2019-12-16expose the ability to disable C sanitizationAndrew Kelley
and disable C sanitization when building libcs. Empirically, they seem to trigger undef-sanitization.
2019-12-04add `other` OS and fix regression in build-exe for freestandingAndrew Kelley
2019-12-02remove upstream support for Zen hobby OSAndrew Kelley
The new plan to support hobby operating systems is #3784. And what kind of name is "Zen" anyway? There's already a [Zen programming language](http://zenlang.sourceforge.net/) and that's just confusing.
2019-11-25move logic to the appropriate layers; add new compile errorAndrew Kelley
2019-10-30DragonFlyBSD supportTse
2019-10-24avoid passing -march=native when not supportedAndrew Kelley
Clang does not support -march=native for all targets. Arguably it should always work, but in reality it gives: error: the clang compiler does not support '-march=native' If we move CPU detection logic into Zig itelf, we will not need this, instead we will always pass target features and CPU configuration explicitly. For now, we simply avoid passing the flag when it is known to not be supported.
2019-09-28Merge pull request #3331 from meme/android-ndkAndrew Kelley
Support Android NDK
2019-09-27avoid duplicated code of specifying the default glibc versionAndrew Kelley
2019-09-27support Android NDK and bionicmeme
2019-09-26Initial support for mipsel architecture¬LemonBoy
2019-09-15Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-09-13Merge branch 'uefi' of https://github.com/nrdmn/zig into nrdmn-uefiAndrew Kelley
2019-09-10Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-09-05I'm pretty sure `sp` is the stack pointer on all ARMAndrew Kelley
2019-09-02Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-09-01Revert "Merge pull request #2991 from emekoi/mingw-ci"Andrew Kelley
This reverts commit ec7d7a5b14540ea3b2bab9f11318630338467965, reversing changes made to 81c441f8855d4c58f0b2ff86d3d007cf0bf395d3. It looks like this broke colors in Windows Command Prompt (#3147) and this method of detecting native C ABI isn't working well (#3121).
2019-08-28Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-08-21Merge pull request #2991 from emekoi/mingw-ciAndrew Kelley
mingw improvements
2019-08-16target: add missing switch caseAndrew Kelley
2019-08-16Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-08-16correct LLVM subarch names for armyvt
2019-08-11fix async function frames not aligned enoughAndrew Kelley
2019-08-03move windows abi detection to `get_native_target`emekoi
2019-08-03Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-08-02accept unix style paths on windows-gnuemekoi
2019-08-02implemented runtime abi detetction for windowsemekoi