File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2356,7 +2356,16 @@ pub fn wantSharedLibSymLinks(target: Target) bool {
23562356 return target .os .tag != .windows ;
23572357}
23582358
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 {
23602369 const gop = b .graph .system_library_options .getOrPut (b .allocator , name ) catch @panic ("OOM" );
23612370 if (gop .found_existing ) switch (gop .value_ptr .* ) {
23622371 .user_disabled = > {
@@ -2371,7 +2380,7 @@ pub fn systemIntegrationOption(b: *Build, name: []const u8) bool {
23712380 .declared_enabled = > return true ,
23722381 } else {
23732382 gop .key_ptr .* = b .dupe (name );
2374- if (b .graph .system_package_mode ) {
2383+ if (config . default orelse b .graph .system_package_mode ) {
23752384 gop .value_ptr .* = .declared_enabled ;
23762385 return true ;
23772386 } else {
You can’t perform that action at this time.
0 commit comments