Skip to content

wasi-libc: remove crt1.o as it's not WASI ABI compatible #9318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions lib/libc/wasi/libc-bottom-half/crt/crt1.c

This file was deleted.

15 changes: 0 additions & 15 deletions src/wasi_libc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const target_util = @import("target.zig");
const musl = @import("musl.zig");

pub const CRTFile = enum {
crt1_o,
crt1_reactor_o,
crt1_command_o,
libc_a,
Expand Down Expand Up @@ -71,19 +70,6 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
const arena = &arena_allocator.allocator;

switch (crt_file) {
.crt1_o => {
var args = std.ArrayList([]const u8).init(arena);
try addCCArgs(comp, arena, &args, false);
try addLibcBottomHalfIncludes(comp, arena, &args);
return comp.build_crt_file("crt1", .Obj, &[1]Compilation.CSourceFile{
.{
.src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
"libc", try sanitize(arena, crt1_src_file),
}),
.extra_flags = args.items,
},
});
},
.crt1_reactor_o => {
var args = std.ArrayList([]const u8).init(arena);
try addCCArgs(comp, arena, &args, false);
Expand Down Expand Up @@ -1151,7 +1137,6 @@ const libc_top_half_src_files = [_][]const u8{
"wasi/libc-top-half/sources/arc4random.c",
};

const crt1_src_file = "wasi/libc-bottom-half/crt/crt1.c";
const crt1_command_src_file = "wasi/libc-bottom-half/crt/crt1-command.c";
const crt1_reactor_src_file = "wasi/libc-bottom-half/crt/crt1-reactor.c";

Expand Down