aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/CompileStep.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-04-16 12:43:35 -0700
committerGitHub <noreply@github.com>2023-04-16 12:43:35 -0700
commitb0186f31002760c9940d8c06c2ac7baa9d52f404 (patch)
tree25bb2c86739f6ee3d9cd8a9e5f77d046c4b12487 /lib/std/Build/CompileStep.zig
parent397649fb0934b75122e795bfb234d46693425d98 (diff)
parent9e6647582da0d7cbf8a441cefea0bb9fae18bb5c (diff)
downloadzig-b0186f31002760c9940d8c06c2ac7baa9d52f404.tar.gz
zig-b0186f31002760c9940d8c06c2ac7baa9d52f404.zip
Merge pull request #15277 from ziglang/tests
add CI test coverage for more target combinations
Diffstat (limited to 'lib/std/Build/CompileStep.zig')
-rw-r--r--lib/std/Build/CompileStep.zig20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/std/Build/CompileStep.zig b/lib/std/Build/CompileStep.zig
index 7ca9dda23b..9340ec8d99 100644
--- a/lib/std/Build/CompileStep.zig
+++ b/lib/std/Build/CompileStep.zig
@@ -63,7 +63,7 @@ emit_llvm_ir: EmitOption = .default,
// so it is not an EmitOption for now.
emit_h: bool = false,
bundle_compiler_rt: ?bool = null,
-single_threaded: ?bool = null,
+single_threaded: ?bool,
stack_protector: ?bool = null,
disable_stack_probing: bool,
disable_sanitize_c: bool,
@@ -101,8 +101,8 @@ link_objects: ArrayList(LinkObject),
include_dirs: ArrayList(IncludeDir),
c_macros: ArrayList([]const u8),
installed_headers: ArrayList(*Step),
-is_linking_libc: bool = false,
-is_linking_libcpp: bool = false,
+is_linking_libc: bool,
+is_linking_libcpp: bool,
vcpkg_bin_path: ?[]const u8 = null,
/// This may be set in order to override the default install directory
@@ -207,8 +207,8 @@ force_undefined_symbols: std.StringHashMap(void),
stack_size: ?u64 = null,
want_lto: ?bool = null,
-use_llvm: ?bool = null,
-use_lld: ?bool = null,
+use_llvm: ?bool,
+use_lld: ?bool,
/// This is an advanced setting that can change the intent of this CompileStep.
/// If this slice has nonzero length, it means that this CompileStep exists to
@@ -287,6 +287,10 @@ pub const Options = struct {
max_rss: usize = 0,
filter: ?[]const u8 = null,
test_runner: ?[]const u8 = null,
+ link_libc: ?bool = null,
+ single_threaded: ?bool = null,
+ use_llvm: ?bool = null,
+ use_lld: ?bool = null,
};
pub const Kind = enum {
@@ -412,6 +416,12 @@ pub fn create(owner: *std.Build, options: Options) *CompileStep {
.output_dirname_source = GeneratedFile{ .step = &self.step },
.target_info = target_info,
+
+ .is_linking_libc = options.link_libc orelse false,
+ .is_linking_libcpp = false,
+ .single_threaded = options.single_threaded,
+ .use_llvm = options.use_llvm,
+ .use_lld = options.use_lld,
};
if (self.kind == .lib) {