aboutsummaryrefslogtreecommitdiff
path: root/src/mingw.zig
AgeCommit message (Collapse)Author
2022-08-30avoid exposing supportsTailCall in the standard libraryAndrew Kelley
This is problematic because in practice it depends on whether the compiler backend supports it too, as evidenced by the TODO comment about LLVM not supporting some architectures that in fact do support tail calls. Instead this logic is organized strategically in src/target.zig, part of the internal compiler source code, and the behavior tests in question duplicate some logic for deciding whether to proceed with the test. The proper place to expose this flag is in `@import("builtin")` - the generated source file - so that third party compilers can advertise whether they support tail calls.
2022-08-25add ability to pass force undefined symbols to the linkerJakub Konka
This commit enables `-u <symbol>` for ELF and `-include:<symbol>` for COFF linkers for use internally. This means we do not expose these flags to the users just yet, however, we make use of them internally whenever required. One such use case is forcing inclusion of `_tls_index` when linking for Windows with mingw and LTO and dead code stripping enabled. This ensures we add `_tls_index` to the symbol resolver as an undefined symbol and force the linker to include an atom that provides it marking it a dead-code-stripping root - meaning it will not be garbage collected by the linker no matter what.
2022-04-29std: Do not allocate the result for ChildProcess.initJimmi Holst Christensen
Instead, just return ChildProcess directly. This structure does not require a stable address, so we can put it on the stack just fine. If someone wants it on the heap they should do. const proc = try allocator.create(ChildProcess); proc.* = ChildProcess.init(args, allocator);
2022-02-06Avoid depending on child process execution when not supported by host OSCody Tapscott
In accordance with the requesting issue (#10750): - `zig test` skips any tests that it cannot spawn, returning success - `zig run` and `zig build` exit with failure, reporting the command the cannot be run - `zig clang`, `zig ar`, etc. already punt directly to the appropriate clang/lld main(), even before this change - Native `libc` Detection is not supported Additionally, `exec()` and related Builder functions error at run-time, reporting the command that cannot be run
2022-01-07lint: duplicate import (#10519)Meghan
2021-11-30allocgate: renamed getAllocator function to allocatorLee Cannon
2021-11-30allocgate: stage 1 and 2 buildingLee Cannon
2021-11-30allocgate: std Allocator interface refactorLee Cannon
2021-11-15pre-merge cleanupsAndrew Kelley
* Annotate workarounds with their corresponding GitHub issue links. * Enable test coverage for LTO on Windows with the added c_compiler test.
2021-11-15build: workaround link error with LTO and mingwxavier
The symbol "_tls_index" gets lost when using LTO. Disabling LTO on the object file that defines it allows the link to work. fixes https://github.com/ziglang/zig/issues/8531
2021-11-15mingw-w64: add missing file frexp.c to mingwex.libJ.C. Moyer
Fixes a frexp() segfault on Windows.
2021-09-19Update all ensureCapacity calls to the relevant non-deprecated versionRyan Liptak
2021-09-15Added implementation for _fseeki64 and _ftelli64 from mingw-w64 9.0.0 ↵Michal Ziulek
(#9402). (#9766) * Added fseeki64.c from mingw-w64 9.0.0. This file was missing in Zig distribution. This file contains implementation for _fseeki64 and _ftelli64 functions.
2021-09-07changes to build zig-bootstrap aarch64-windowsJonathan Marler
2021-09-07Fix building aarch64-windows-gnu by adding missing libc files and ↵Jonathan Marler
compiler_rt functions (#9555) * fix issue 9519 Added some missing files from mingw * add missing compiler_rt functions * finish PR * add aarch64-windows-gnu to test targets * add more compiler_rt * add log2 * add pow * add modti3
2021-08-21mingw.zig: fix logic to add crt sourcesJonathan Marler
The current version of code uses isARM to check if we are compiling to any arm target then checks the target bit width to either add the 32-bit sources or 64-bit source. However, isARM only returns true for 32-bit targets, and isAARCH64 is for the 64-bit targets. I also replaced the unreachable with a @panic when we receive an unsupported arch because this code is reachable and should turn into an error.
2021-06-21std, src, doc, test: remove unused variablesJacob G-W
2021-01-22stage2: add missing frexpl.c to mingw c source file listAndrew Kelley
2021-01-06stage2: rename and move files related to LLVM backendTimon Kruiper
2021-01-02stage2: Use {s} instead of {} when formatting stringsLemonBoy
2020-12-28stage2: rename llvm.zig to llvm_bindings.zigTimon Kruiper
Putting functions in this file will create functions like `llvm.function`, and the compiler thinks these are llvm intrinsics.
2020-12-24stage2: re-use compiler runtime libs across opt modes and strip flagAndrew Kelley
Previously Zig would need to recompile runtime libs if you changed the values of --strip or -O. Now, unless the `debug_compiler_runtime_libs` flag is set (which is currently not exposed to the CLI), Zig will always choose ReleaseFast or ReleaseSmall for compiler runtime libraries. When the main application chooses ReleaseFast or ReleaseSmall, that value is propagated to compiler runtime libraries. Otherwise a decision is made based on the target, which is currently ReleaseSmall for freestanding WebAssembly and ReleaseFast for everything else. Ultimately the purpose of this commit is to have Debug and ReleaseSafe builds of applications still get optimized builds of, e.g. libcxx and libunwind, as well as to spend less time unnecessarily rebuilding compiler runtime libraries.
2020-11-05Fixed mingw-w64 8.0.0 compilationAlexandros Naskos
Reaplied mingw-w64 header patch
2020-11-05Updated mingw-w64 to version 8.0.0Alexandros Naskos
2020-10-01stage2: Add missing defines for building dllcrt2.oLemonBoy
Closes #6482
2020-09-29mingw: better -D arg for processing def.in filesAndrew Kelley
Thanks @LemonBoy
2020-09-28stage2: building DLL import lib filesAndrew Kelley
2020-09-28stage2: building mingw-w64 and COFF LDD linkingAndrew Kelley
still TODO is the task of creating import .lib files for DLLs on the fly both for -lfoo and for e.g. `extern "kernel32"`