diff options
| author | Valentin Anger <syrupthinker@gryphno.de> | 2020-01-29 13:22:11 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-01-29 16:09:07 -0500 |
| commit | d448c3d38af9f8f70daaa2817a5834e30da4b8ca (patch) | |
| tree | 647e1885ea02bbe9557338d0edb818f17abaae21 /lib/std/build.zig | |
| parent | 59bc1d272120bd860cc3cd1f894a2a4e08fc1f3f (diff) | |
| download | zig-d448c3d38af9f8f70daaa2817a5834e30da4b8ca.tar.gz zig-d448c3d38af9f8f70daaa2817a5834e30da4b8ca.zip | |
Add support for code model selection
Diffstat (limited to 'lib/std/build.zig')
| -rw-r--r-- | lib/std/build.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig index d310f53c06..f535b022af 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -1149,6 +1149,7 @@ pub const LibExeObjStep = struct { name_prefix: []const u8, filter: ?[]const u8, single_threaded: bool, + code_model: builtin.CodeModel = .default, root_src: ?FileSource, out_h_filename: []const u8, @@ -1970,6 +1971,11 @@ pub const LibExeObjStep = struct { try zig_args.append("-fno-sanitize-c"); } + if (self.code_model != .default) { + try zig_args.append("-code-model"); + try zig_args.append(@tagName(self.code_model)); + } + switch (self.target) { .Native => {}, .Cross => |cross| { |
