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

Commit

Permalink
Enable PIC (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesn authored May 3, 2024
1 parent 9c72163 commit 84a5389
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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 {}

0 comments on commit 84a5389

Please sign in to comment.