aboutsummaryrefslogtreecommitdiff
path: root/src/target.zig
AgeCommit message (Collapse)Author
2021-01-19SPIR-V: Add glsl450 and vulkan spir-v operating system definitionsRobin Voetter
2021-01-11stage2: cleanups regarding red zone CLI flagsAndrew Kelley
* CLI: change to -mred-zone and -mno-red-zone to match gcc/clang. * build.zig: remove the double negative and make it an optional bool. This follows precedent from other flags, allowing the compiler CLI to be the decider of what is default instead of duplicating the default value into the build system code. * Compilation: make it an optional `want_red_zone` instead of a `no_red_zone` bool. The default is decided by a call to `target_util.hasRedZone`. * When creating a Clang command line, put -mred-zone on the command line if we are forcing it to be enabled. * Update update_clang_options.zig with respect to the recent {s}/{} format changes. * `zig cc` integration with red zone preference.
2021-01-06stage2: rename and move files related to LLVM backendTimon Kruiper
2020-12-30std: Remove duplicated codeLemonBoy
Make osRequiresLibC call Os.requiresLibC, let's keep a single list of OS that require the libc to be linked in.
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-12-17macos: add unfiltered aarch64 libc headersJakub Konka
2020-12-08glibc: additionally provide -lcryptAndrew Kelley
also remove redundant "util" string matching.
2020-11-30restore -target wasm32-freestanding-musl for C headersAndrew Kelley
See #5854 Some tiny tweaks too: * Use `wasm-freestanding-musl` instead of `wasm32-freestanding-musl`, making it pointer-size-agnostic. * Fix trying to build non-existent wasm musl start files.
2020-11-08macOS: depend on bundled headers even for nativeAndrew Kelley
This is an alternate fix for #6773. Reverts 872bc787b56f71e53c80f4681523bc8356915b71.
2020-10-21Add minimal set of macOS libc headersJakub Konka
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-17code cleanupsAndrew Kelley
* in selfExePath, return errors instead of defaulting to bogus data * less invasive edits to the logic of link/Elf.zig * less indentation
2020-10-17Merge branch 'master' into openbsd-minimalSebastien Marie
2020-10-12Rename .macosx to .macosVignesh Rajagopalan
2020-10-11add minimal openbsd supportSébastien Marie
2020-10-03stage2: Build libunwind for non-msvc Windows targetsLemonBoy
Closes #6497
2020-09-29stage2: infer --strip on wasm buildsAndrew Kelley
2020-09-28stage2: building DLL import lib filesAndrew Kelley
2020-09-26fix another round of regressions in this branchAndrew Kelley
* std.log: still print error messages in ReleaseSmall builds. - when start code gets an error code from main, it uses std.log.err to report the error. this resulted in a test failure because ReleaseSmall wasn't printing `error: TheErrorCode` when an error was returned from main. But that seems like it should keep working. So I changed the std.log defaults. I plan to follow this up with a proposal to change the names of and reduce the quantity of the log levels. * warning emitted when using -femit-h when using stage1 backend; fatal log message when using -femit-h with self-hosted backend (because the feature is not yet available) * fix double `test-cli` build steps in zig's build.zig * update docgen to use new CLI * translate-c uses `-x c` and generates a temporary basename with a `.h` extension. Otherwise clang reports an error. * --show-builtin implies -fno-emit-bin * restore the compile error for using an extern "c" function without putting -lc on the build line. we have to know about the libc dependency up front. * Fix ReleaseFast and ReleaseSmall getting swapped when passing the value to the stage1 backend. * correct the zig0 CLI usage text. * update test harness code to the new CLI.
2020-09-23stage2: don't build libunwind on OS's that don't need itAndrew Kelley
2020-09-21rename src-self-hosted/ to src/Andrew Kelley