diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-11 23:45:40 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-02-11 23:45:40 -0700 |
| commit | b4e344bcf859f2df89637e0825a2e0e57d092ef6 (patch) | |
| tree | 44465c5c3eadcfdc57f0a0a3eb5cffff9107bd7f /src/main.zig | |
| parent | 3d0f4b90305bc1815ccc86613cb3da715e9b62c0 (diff) | |
| parent | d3565ed6b48c9c66128f181e7b90b5348504cb3f (diff) | |
| download | zig-b4e344bcf859f2df89637e0825a2e0e57d092ef6.tar.gz zig-b4e344bcf859f2df89637e0825a2e0e57d092ef6.zip | |
Merge remote-tracking branch 'origin/master' into ast-memory-layout
Conflicts:
* lib/std/zig/ast.zig
* lib/std/zig/parse.zig
* lib/std/zig/parser_test.zig
* lib/std/zig/render.zig
* src/Module.zig
* src/zir.zig
I resolved some of the conflicts by reverting a small portion of
@tadeokondrak's stage2 logic here regarding `callconv(.Inline)`.
It will need to get reworked as part of this branch.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig index 2ae87fa56c..c0ac41d9bf 100644 --- a/src/main.zig +++ b/src/main.zig @@ -312,6 +312,7 @@ const usage_build_generic = \\ pe Portable Executable (Windows) \\ coff Common Object File Format (Windows) \\ macho macOS relocatables + \\ spirv Standard, Portable Intermediate Representation V (SPIR-V) \\ hex (planned) Intel IHEX \\ raw (planned) Dump machine code directly \\ -dirafter [dir] Add directory to AFTER include search path @@ -1185,6 +1186,7 @@ fn buildOutputType( .framework_dir => try framework_dirs.append(it.only_arg), .framework => try frameworks.append(it.only_arg), .nostdlibinc => want_native_include_dirs = false, + .strip => strip = true, } } // Parse linker args. @@ -1535,8 +1537,9 @@ fn buildOutputType( } const has_sysroot = if (comptime std.Target.current.isDarwin()) outer: { - const at_least_big_sur = target_info.target.os.getVersionRange().semver.min.major >= 11; - if (at_least_big_sur) { + const min = target_info.target.os.getVersionRange().semver.min; + const at_least_catalina = min.major >= 11 or (min.major >= 10 and min.minor >= 15); + if (at_least_catalina) { const sdk_path = try std.zig.system.getSDKPath(arena); try clang_argv.ensureCapacity(clang_argv.items.len + 2); clang_argv.appendAssumeCapacity("-isysroot"); @@ -1588,6 +1591,8 @@ fn buildOutputType( break :blk .hex; } else if (mem.eql(u8, ofmt, "raw")) { break :blk .raw; + } else if (mem.eql(u8, ofmt, "spirv")) { + break :blk .spirv; } else { fatal("unsupported object format: {s}", .{ofmt}); } @@ -3047,6 +3052,7 @@ pub const ClangArgIterator = struct { nostdlibinc, red_zone, no_red_zone, + strip, }; const Args = struct { |
