diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-09-15 14:46:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-09-15 14:51:08 -0700 |
| commit | f3ebfcae3882c03da84821abed40167ea07a8c78 (patch) | |
| tree | f1b759c94cba5b020a9ffb141fc62cb686fc5f04 /lib/std/zig.zig | |
| parent | 111a2dcf3ad53c0c8ad2c9e7c9bd042b81e90c82 (diff) | |
| parent | 0395b35cee8d4082cc40b0dcd0298f797f42309d (diff) | |
| download | zig-f3ebfcae3882c03da84821abed40167ea07a8c78.tar.gz zig-f3ebfcae3882c03da84821abed40167ea07a8c78.zip | |
Merge remote-tracking branch 'origin/master' into llvm13
Conflicts:
* cmake/Findclang.cmake
* cmake/Findlld.cmake
* cmake/Findllvm.cmake
In master branch, more search paths were added to these files with "12"
in the path. In this commit I updated them to "13".
* src/stage1/codegen.cpp
* src/zig_llvm.cpp
* src/zig_llvm.h
In master branch, ZigLLVMBuildCmpXchg is improved to add
`is_single_threaded`. However, the LLVM 13 C API has this already, and
in the llvm13 branch, ZigLLVMBuildCmpXchg is deleted in favor of the C
API. In this commit I updated stage2 to use the LLVM 13 C API rather
than depending on an improved ZigLLVMBuildCmpXchg.
Additionally, src/target.zig largestAtomicBits needed to be updated to
include the new m68k ISA.
Diffstat (limited to 'lib/std/zig.zig')
| -rw-r--r-- | lib/std/zig.zig | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/std/zig.zig b/lib/std/zig.zig index 85ad4d2c81..fa922a7c73 100644 --- a/lib/std/zig.zig +++ b/lib/std/zig.zig @@ -10,7 +10,7 @@ pub const fmtEscapes = fmt.fmtEscapes; pub const isValidId = fmt.isValidId; pub const parse = @import("zig/parse.zig").parse; pub const string_literal = @import("zig/string_literal.zig"); -pub const ast = @import("zig/ast.zig"); +pub const Ast = @import("zig/Ast.zig"); pub const system = @import("zig/system.zig"); pub const CrossTarget = @import("zig/cross_target.zig").CrossTarget; @@ -157,7 +157,6 @@ pub fn binNameAlloc(allocator: *std.mem.Allocator, options: BinNameOptions) erro } }, } - return std.fmt.allocPrint(allocator, "{s}{s}{s}", .{ target.libPrefix(), root_name, suffix }); }, .Obj => return std.fmt.allocPrint(allocator, "{s}.o", .{root_name}), }, @@ -177,9 +176,11 @@ pub fn binNameAlloc(allocator: *std.mem.Allocator, options: BinNameOptions) erro .spirv => return std.fmt.allocPrint(allocator, "{s}.spv", .{root_name}), .hex => return std.fmt.allocPrint(allocator, "{s}.ihex", .{root_name}), .raw => return std.fmt.allocPrint(allocator, "{s}.bin", .{root_name}), - .plan9 => return std.fmt.allocPrint(allocator, "{s}{s}", .{ - root_name, ofmt.fileExt(target.cpu.arch), - }), + .plan9 => switch (options.output_mode) { + .Exe => return allocator.dupe(u8, root_name), + .Obj => return std.fmt.allocPrint(allocator, "{s}{s}", .{ root_name, ofmt.fileExt(target.cpu.arch) }), + .Lib => return std.fmt.allocPrint(allocator, "{s}{s}.a", .{ target.libPrefix(), root_name }), + }, } } |
