Merge pull request #128 from birth-software/rework-polymorphism
Rework polymorphism
This commit is contained in:
commit
c76531ed7a
File diff suppressed because it is too large
Load Diff
@ -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 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 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 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 native_target = b.resolveTargetQuery(.{});
|
||||||
const optimization = b.standardOptimizeOption(.{});
|
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 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();
|
const compiler_options = b.addOptions();
|
||||||
compiler_options.addOption(bool, "print_stack_trace", print_stack_trace);
|
compiler_options.addOption(bool, "print_stack_trace", print_stack_trace);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user