aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-12-16 00:39:36 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-01-01 17:51:20 -0700
commit2047a6b82d2e6cdbddde3e7f1c93df9e72216052 (patch)
treec9717626d48bc85a0e5dbe12bb2d815241ac9c94 /src/Compilation.zig
parent46297087871dec88c2b632d057f1e55b662126df (diff)
downloadzig-2047a6b82d2e6cdbddde3e7f1c93df9e72216052.tar.gz
zig-2047a6b82d2e6cdbddde3e7f1c93df9e72216052.zip
fix remaining compile errors except one
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index a39d852563..14a39f1bb3 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -229,7 +229,7 @@ pub const Emit = struct {
/// Returns the full path to `basename` if it were in the same directory as the
/// `Emit` sub_path.
- pub fn basenamePath(emit: Emit, arena: Allocator, basename: [:0]const u8) ![:0]const u8 {
+ pub fn basenamePath(emit: Emit, arena: Allocator, basename: []const u8) ![:0]const u8 {
const full_path = if (emit.directory.path) |p|
try std.fs.path.join(arena, &[_][]const u8{ p, emit.sub_path })
else
@@ -238,7 +238,7 @@ pub const Emit = struct {
if (std.fs.path.dirname(full_path)) |dirname| {
return try std.fs.path.joinZ(arena, &.{ dirname, basename });
} else {
- return basename;
+ return try arena.dupeZ(u8, basename);
}
}
};
@@ -1038,8 +1038,8 @@ pub const InitOptions = struct {
linker_compress_debug_sections: ?link.File.Elf.CompressDebugSections = null,
linker_module_definition_file: ?[]const u8 = null,
linker_sort_section: ?link.File.Elf.SortSection = null,
- major_subsystem_version: ?u32 = null,
- minor_subsystem_version: ?u32 = null,
+ major_subsystem_version: ?u16 = null,
+ minor_subsystem_version: ?u16 = null,
clang_passthrough_mode: bool = false,
verbose_cc: bool = false,
verbose_link: bool = false,