Merge pull request #128 from birth-software/rework-polymorphism

Rework polymorphism
This commit is contained in:
David 2024-04-08 19:02:18 -06:00 committed by GitHub
commit c76531ed7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 238 additions and 284 deletions

File diff suppressed because it is too large Load Diff

View File

@ -23,11 +23,14 @@ pub fn build(b: *std.Build) !void {
const self_hosted_ci = b.option(bool, "self_hosted_ci", "This option enables the self-hosted CI behavior") orelse false;
const third_party_ci = b.option(bool, "third_party_ci", "This option enables the third-party CI behavior") orelse false;
const is_ci = self_hosted_ci or third_party_ci;
const print_stack_trace = b.option(bool, "print_stack_trace", "This option enables printing stack traces inside the compiler") orelse is_ci or os == .macos;
const print_stack_trace = b.option(bool, "print_stack_trace", "This option enables printing stack traces inside the compiler") orelse is_ci; //or os == .macos;
const native_target = b.resolveTargetQuery(.{});
const optimization = b.standardOptimizeOption(.{});
const use_debug = b.option(bool, "use_debug", "This option enables the LLVM debug build in the development PC") orelse false;
const static = b.option(bool, "static", "This option enables the compiler to be built statically") orelse use_debug;
const static = b.option(bool, "static", "This option enables the compiler to be built statically") orelse switch (@import("builtin").os.tag) {
else => use_debug,
.macos => true,
};
const compiler_options = b.addOptions();
compiler_options.addOption(bool, "print_stack_trace", print_stack_trace);