aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorRobin Voetter <robin@voetter.nl>2023-11-23 23:58:50 +0100
committerRobin Voetter <robin@voetter.nl>2023-11-24 11:40:18 +0100
commitb4b1c4df640c9b40c303eef7d0364d01ec490a8e (patch)
treebf5d534fb5b3c7cdb3b78f2846e4272939258e45 /src/link.zig
parentcb026c5d599dddc38f34ee93438d52bbffe2f6ad (diff)
downloadzig-b4b1c4df640c9b40c303eef7d0364d01ec490a8e.tar.gz
zig-b4b1c4df640c9b40c303eef7d0364d01ec490a8e.zip
spirv: add -fstructured-cfg option
This enables the compiler to generate a structured cfg even in opencl, even if it is not strictly required by the SPIR-V Kernel specification.
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/link.zig b/src/link.zig
index 1648d6a63e..c6b946ddc4 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -268,6 +268,9 @@ pub const Options = struct {
/// (Windows) .def file to specify when linking
module_definition_file: ?[]const u8 = null,
+ /// (SPIR-V) whether to generate a structured control flow graph or not
+ want_structured_cfg: ?bool = null,
+
pub fn effectiveOutputMode(options: Options) std.builtin.OutputMode {
return if (options.use_lld) .Obj else options.output_mode;
}