diff options
| author | Robin Voetter <robin@voetter.nl> | 2023-11-23 23:58:50 +0100 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2023-11-24 11:40:18 +0100 |
| commit | b4b1c4df640c9b40c303eef7d0364d01ec490a8e (patch) | |
| tree | bf5d534fb5b3c7cdb3b78f2846e4272939258e45 /src/link.zig | |
| parent | cb026c5d599dddc38f34ee93438d52bbffe2f6ad (diff) | |
| download | zig-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.zig | 3 |
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; } |
