| ... | ... | @@ -2356,7 +2356,16 @@ pub fn wantSharedLibSymLinks(target: Target) bool { |
| 2356 | 2356 | return target.os.tag != .windows; |
| 2357 | 2357 | } |
| 2358 | 2358 | |
| 2359 | | pub fn systemIntegrationOption(b: *Build, name: []const u8) bool { |
| 2359 | pub const SystemIntegrationOptionConfig = struct { |
| 2360 | /// If left as null, then the default will depend on system_package_mode. |
| 2361 | default: ?bool = null, |
| 2362 | }; |
| 2363 | |
| 2364 | pub fn systemIntegrationOption( |
| 2365 | b: *Build, |
| 2366 | name: []const u8, |
| 2367 | config: SystemIntegrationOptionConfig, |
| 2368 | ) bool { |
| 2360 | 2369 | const gop = b.graph.system_library_options.getOrPut(b.allocator, name) catch @panic("OOM"); |
| 2361 | 2370 | if (gop.found_existing) switch (gop.value_ptr.*) { |
| 2362 | 2371 | .user_disabled => { |
| ... | ... | @@ -2371,7 +2380,7 @@ pub fn systemIntegrationOption(b: *Build, name: []const u8) bool { |
| 2371 | 2380 | .declared_enabled => return true, |
| 2372 | 2381 | } else { |
| 2373 | 2382 | gop.key_ptr.* = b.dupe(name); |
| 2374 | | if (b.graph.system_package_mode) { |
| 2383 | if (config.default orelse b.graph.system_package_mode) { |
| 2375 | 2384 | gop.value_ptr.* = .declared_enabled; |
| 2376 | 2385 | return true; |
| 2377 | 2386 | } else { |