Skip to content

Commit 7334cf9

Browse files
committed
refactor: simplify LLVM name creation
1 parent a063cf6 commit 7334cf9

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

build.zig

+1-8
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,7 @@ pub fn build(b: *std.Build) !void {
328328

329329
const llvm_inc_dir = std.mem.trimRight(u8, b.run(&.{ "llvm-config", "--includedir" }), "\n");
330330
const llvm_inc_path = std.Build.LazyPath{ .cwd_relative = llvm_inc_dir };
331-
332-
const llvm_libs = std.mem.trimRight(u8, b.run(&.{ "llvm-config", "--libs" }), "\n");
333-
const llvm_name: []const u8 = blk: {
334-
if (std.mem.indexOf(u8, llvm_libs, "-lLLVM-1")) |llvm_lib_name_idx| {
335-
break :blk llvm_libs[llvm_lib_name_idx + 2 .. llvm_lib_name_idx + 9];
336-
}
337-
break :blk "LLVM";
338-
};
331+
const llvm_name = b.fmt("LLVM-{}", .{llvm_major});
339332

340333
const llvm_common_obj = b.addObject(.{
341334
.name = "afl-llvm-common",

0 commit comments

Comments
 (0)