Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Enable PIC #19

Merged
merged 2 commits into from
May 3, 2024
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
3 changes: 2 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
.version = version,
.root_source_file = .{ .path = "src/lib.zig" },
.pic = true,
});
_ = lib.getEmittedH(); // Needed to trigger header generation
lib.bundle_compiler_rt = true;
lib.pie = true;
const lib_install = b.addInstallArtifact(lib, .{});
// Ideally we would use dlib.getEmittedH(), but https://github.com/ziglang/zig/issues/18497
const lib_header = b.addInstallFile(.{ .path = "zig-cache/fastlanez.h" }, "include/fastlanez.h");
Expand All @@ -56,6 +56,7 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
.version = version,
.root_source_file = .{ .path = "src/lib.zig" },
.pic = true,
});
_ = lib.getEmittedH(); // Needed to trigger header generation
dylib.bundle_compiler_rt = true;
Expand Down
2 changes: 0 additions & 2 deletions src/lib.zig
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,3 @@ comptime {
@export(Wrapper.decode, .{ .name = "fl_delta_decode_" ++ @typeName(E) });
}
}

pub fn main() void {}