Skip to content

Commit

Permalink
Merge pull request #143 from kubkon/macho-cleanup-parallel-writes
Browse files Browse the repository at this point in the history
macho: speed up the linker by embracing multi-threaded approach
  • Loading branch information
kubkon authored Jul 2, 2024
2 parents 3eaf362 + 5334972 commit bf7b2bb
Show file tree
Hide file tree
Showing 27 changed files with 4,633 additions and 3,217 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ jobs:
- run: zig fmt --check src
- run: zig build test -Dhas-zig

macos_11:
name: Test macos 11.0
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
- run: zig version
- run: zig build test -Dhas-static -Dhas-zig

gcc_musl:
name: Test gcc with musl
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub fn build(b: *std.Build) void {
};
const use_llvm = b.option(bool, "use-llvm", "Whether to use LLVM") orelse true;
const use_lld = if (builtin.os.tag == .macos) false else use_llvm;
const sanitize_thread = b.option(bool, "sanitize-thread", "Enable thread-sanitization") orelse false;
const single_threaded = b.option(bool, "single-threaded", "Force single-threaded") orelse false;

const yaml = b.dependency("zig-yaml", .{
.target = target,
Expand All @@ -36,6 +38,8 @@ pub fn build(b: *std.Build) void {
.optimize = mode,
.use_llvm = use_llvm,
.use_lld = use_lld,
.sanitize_thread = sanitize_thread,
.single_threaded = single_threaded,
});
exe.root_module.addImport("yaml", yaml.module("yaml"));
exe.root_module.addImport("dis_x86_64", dis_x86_64.module("dis_x86_64"));
Expand Down Expand Up @@ -91,6 +95,8 @@ pub fn build(b: *std.Build) void {
.optimize = mode,
.use_llvm = use_llvm,
.use_lld = use_lld,
.sanitize_thread = sanitize_thread,
.single_threaded = single_threaded,
});
const unit_tests_opts = b.addOptions();
unit_tests.root_module.addOptions("build_options", unit_tests_opts);
Expand Down
Loading

0 comments on commit bf7b2bb

Please sign in to comment.