Skip to content
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

build: Add option for not using llvm to build aro #797

Merged
merged 1 commit into from
Nov 2, 2024
Merged
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
7 changes: 7 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub fn build(b: *Build) !void {
const tracy = b.option([]const u8, "tracy", "Enable Tracy integration. Supply path to Tracy source");
const tracy_callstack = b.option(bool, "tracy-callstack", "Include callstack information with Tracy data. Does nothing if -Dtracy is not provided") orelse false;
const tracy_allocation = b.option(bool, "tracy-allocation", "Include allocation information with Tracy data. Does nothing if -Dtracy is not provided") orelse false;
const use_llvm = b.option(bool, "llvm", "Use LLVM backend to generate aro executable");

const system_defaults = b.addOptions();
system_defaults.addOption(bool, "enable_linker_build_id", enable_linker_build_id);
Expand Down Expand Up @@ -168,6 +169,8 @@ pub fn build(b: *Build) !void {
.optimize = mode,
.target = target,
.single_threaded = true,
.use_llvm = use_llvm,
.use_lld = use_llvm,
});
exe.root_module.addImport("aro", aro_module);

Expand Down Expand Up @@ -217,6 +220,8 @@ pub fn build(b: *Build) !void {
.root_source_file = b.path("test/runner.zig"),
.optimize = mode,
.target = target,
.use_llvm = use_llvm,
.use_lld = use_llvm,
});
integration_tests.root_module.addImport("aro", aro_module);
const test_runner_options = b.addOptions();
Expand All @@ -238,6 +243,8 @@ pub fn build(b: *Build) !void {
.root_source_file = b.path("test/record_runner.zig"),
.optimize = mode,
.target = target,
.use_llvm = use_llvm,
.use_lld = use_llvm,
});
record_tests.root_module.addImport("aro", aro_module);
const record_tests_runner = b.addRunArtifact(record_tests);
Expand Down
Loading