aboutsummaryrefslogtreecommitdiff
path: root/test/standalone/c_compiler/build.zig
AgeCommit message (Collapse)Author
2025-04-09Merge pull request #23501 from imreallybadatnames/masterimreallybadatnames™️
Step.Compile: use LtoMode enum for lto option
2024-12-18test-standalone: migrate from deprecated std.Build APIsmlugg
2024-10-21coff: fix incorrect default `image_base` values and re-enable shared library ↵kcbanner
tests on Windows This was the cause of aarch64-windows shared libraries causing "bad image" errors during load-time linking. I also re-enabled the tests that were surfacing this bug.
2024-06-13Change deprecated b.host to b.graph.host in tests and Zig's build.zigKrzysztof Wolicki
2024-04-11remove deprecated LazyPath.path union tagAndrew Kelley
2024-01-01std.Build.ResolvedTarget: rename target field to resultAndrew Kelley
This change is seemingly insignificant but I actually agonized over this for three days. Some other things I considered: * (status quo in master branch) make Compile step creation functions accept a Target.Query and delete the ResolvedTarget struct. - downside: redundantly resolve target queries many times * same as before but additionally add a hash map to cache target query resolutions. - downside: now there is a hash map that doesn't actually need to exist, just to make the API more ergonomic. * add is_native_os and is_native_abi fields to std.Target and use it directly as the result of resolving a target query. - downside: they really don't belong there. They would be available as comptime booleans via `@import("builtin")` but they should not be exposed that way. With this change the downsides are: * the option name of addExecutable and friends is `target` instead of `resolved_target` matching the type name. - upside: this does not break compatibility with existing build scripts * you likely end up seeing `target.result.cpu.arch` rather than `target.cpu.arch`. - upside: this is an improvement over `target.target.cpu.arch` which it was before this commit. - downside: `b.host.target` is now `b.host.result`.
2024-01-01zig build system: change target, compilation, and module APIsAndrew Kelley
Introduce the concept of "target query" and "resolved target". A target query is what the user specifies, with some things left to default. A resolved target has the default things discovered and populated. In the future, std.zig.CrossTarget will be rename to std.Target.Query. Introduces `std.Build.resolveTargetQuery` to get from one to the other. The concept of `main_mod_path` is gone, no longer supported. You have to put the root source file at the module root now. * remove deprecated API * update build.zig for the breaking API changes in this branch * move std.Build.Step.Compile.BuildId to std.zig.BuildId * add more options to std.Build.ExecutableOptions, std.Build.ObjectOptions, std.Build.SharedLibraryOptions, std.Build.StaticLibraryOptions, and std.Build.TestOptions. * remove `std.Build.constructCMacro`. There is no use for this API. * deprecate `std.Build.Step.Compile.defineCMacro`. Instead, `std.Build.Module.addCMacro` is provided. - remove `std.Build.Step.Compile.defineCMacroRaw`. * deprecate `std.Build.Step.Compile.linkFrameworkNeeded` - use `std.Build.Module.linkFramework` * deprecate `std.Build.Step.Compile.linkFrameworkWeak` - use `std.Build.Module.linkFramework` * move more logic into `std.Build.Module` * allow `target` and `optimize` to be `null` when creating a Module. Along with other fields, those unspecified options will be inherited from parent `Module` when inserted into an import table. * the `target` field of `addExecutable` is now required. pass `b.host` to get the host target.
2023-10-14these tests are failing on x86_64-windows tooAndrew Kelley
2023-09-19disable failing test: standalone.c_compiler on aarch64-windowsAndrew Kelley
Regressed by LLVM 17 Tracked by #16965
2023-09-19c_compiler standalone test: use more descriptive exe namesAndrew Kelley
2023-07-30Build.zig rename orgy (aka: #16353). Renames FileSource to LazyPath and ↵Felix (xq) Queißner
removes functions that take literal paths instead of LazyPath.
2023-03-15re-enable standalone tests based on build.zigAndrew Kelley
2023-01-31combine std.build and std.build.Builder into std.BuildAndrew Kelley
I've been wanting to do this for along time.
2023-01-31update build.zig API usageAndrew Kelley
2022-05-10reduce the scope of this branchAndrew Kelley
* back out the changes to RunStep * move the disabled test to the .cpp code and avoid a confusing name-collision with the _LIBCPP macro prefix * fix merge conflict with the edits to the same test that ensure global initializers are called. Now this branch is only concerned with single-threaded targets and passing the correct macro defines to libc++.
2022-05-10Added _LIBCPP_HAS_NO_THREADS for single_threaded binaries linked with libcxx.Alexander Slesarev
Fixed single-threaded mode for Windows.
2021-11-16tests: disable LTO for windows until issues can be resolvedAndrew Kelley
See #8531
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-10-04migrate from `std.Target.current` to `@import("builtin").target`Andrew Kelley
closes #9388 closes #9321
2021-06-10zig fmtAndrew Kelley
2021-05-25add a standalone for zig as a c/c++ compilerxavier