| author | |
| committer | |
| log | 99a79f98ecfe79fc3d043662448f1a6b44d52c5c |
| tree | b42e93fbf476261ecac62ec703d015b12ff4611a |
| parent | 573d9aab5e8b5eb21f5dfd21fc92f16985ff7e05 |
| parent | 6a8228603c924f8e091c52b98f8043e02843c358 |
| signature |
3 files changed, 29 insertions(+), 3 deletions(-)
src/clang_options_data.zig+9-2| ... | @@ -2610,7 +2610,14 @@ flagpd1("dwarf-ext-refs"), | ... | @@ -2610,7 +2610,14 @@ flagpd1("dwarf-ext-refs"), |
| 2610 | }, | 2610 | }, |
| 2611 | sepd1("dylib_file"), | 2611 | sepd1("dylib_file"), |
| 2612 | flagpd1("dylinker"), | 2612 | flagpd1("dylinker"), |
| 2613 | flagpd1("dynamic"), | 2613 | .{ |
| 2614 | .name = "dynamic", | ||
| 2615 | .syntax = .flag, | ||
| 2616 | .zig_equivalent = .dynamic, | ||
| 2617 | .pd1 = true, | ||
| 2618 | .pd2 = false, | ||
| 2619 | .psl = false, | ||
| 2620 | }, | ||
| 2614 | .{ | 2621 | .{ |
| 2615 | .name = "dynamiclib", | 2622 | .name = "dynamiclib", |
| 2616 | .syntax = .flag, | 2623 | .syntax = .flag, |
| ... | @@ -5698,7 +5705,7 @@ flagpd1("startfiles"), | ... | @@ -5698,7 +5705,7 @@ flagpd1("startfiles"), |
| 5698 | .{ | 5705 | .{ |
| 5699 | .name = "static", | 5706 | .name = "static", |
| 5700 | .syntax = .flag, | 5707 | .syntax = .flag, |
| 5701 | .zig_equivalent = .other, | 5708 | .zig_equivalent = .static, |
| 5702 | .pd1 = true, | 5709 | .pd1 = true, |
| 5703 | .pd2 = true, | 5710 | .pd2 = true, |
| 5704 | .psl = false, | 5711 | .psl = false, |
src/main.zig+12-1| ... | @@ -2348,6 +2348,16 @@ fn buildOutputType( | ... | @@ -2348,6 +2348,16 @@ fn buildOutputType( |
| 2348 | fatal("unsupported -rtlib option '{s}'", .{it.only_arg}); | 2348 | fatal("unsupported -rtlib option '{s}'", .{it.only_arg}); |
| 2349 | } | 2349 | } |
| 2350 | }, | 2350 | }, |
| 2351 | .static => { | ||
| 2352 | create_module.opts.link_mode = .static; | ||
| 2353 | lib_preferred_mode = .static; | ||
| 2354 | lib_search_strategy = .no_fallback; | ||
| 2355 | }, | ||
| 2356 | .dynamic => { | ||
| 2357 | create_module.opts.link_mode = .dynamic; | ||
| 2358 | lib_preferred_mode = .dynamic; | ||
| 2359 | lib_search_strategy = .mode_first; | ||
| 2360 | }, | ||
| 2351 | } | 2361 | } |
| 2352 | } | 2362 | } |
| 2353 | // Parse linker args. | 2363 | // Parse linker args. |
| ... | @@ -4111,7 +4121,6 @@ fn createModule( | ... | @@ -4111,7 +4121,6 @@ fn createModule( |
| 4111 | color, | 4121 | color, |
| 4112 | ) catch |err| fatal("failed to resolve link inputs: {s}", .{@errorName(err)}); | 4122 | ) catch |err| fatal("failed to resolve link inputs: {s}", .{@errorName(err)}); |
| 4113 | 4123 | ||
| 4114 | if (create_module.windows_libs.count() != 0) create_module.opts.any_dyn_libs = true; | ||
| 4115 | if (!create_module.opts.any_dyn_libs) for (create_module.link_inputs.items) |item| switch (item) { | 4124 | if (!create_module.opts.any_dyn_libs) for (create_module.link_inputs.items) |item| switch (item) { |
| 4116 | .dso, .dso_exact => { | 4125 | .dso, .dso_exact => { |
| 4117 | create_module.opts.any_dyn_libs = true; | 4126 | create_module.opts.any_dyn_libs = true; |
| ... | @@ -5978,6 +5987,8 @@ pub const ClangArgIterator = struct { | ... | @@ -5978,6 +5987,8 @@ pub const ClangArgIterator = struct { |
| 5978 | san_cov, | 5987 | san_cov, |
| 5979 | no_san_cov, | 5988 | no_san_cov, |
| 5980 | rtlib, | 5989 | rtlib, |
| 5990 | static, | ||
| 5991 | dynamic, | ||
| 5981 | }; | 5992 | }; |
| 5982 | 5993 | ||
| 5983 | const Args = struct { | 5994 | const Args = struct { |
tools/update_clang_options.zig+8| ... | @@ -572,6 +572,14 @@ const known_options = [_]KnownOpt{ | ... | @@ -572,6 +572,14 @@ const known_options = [_]KnownOpt{ |
| 572 | .name = "rtlib=", | 572 | .name = "rtlib=", |
| 573 | .ident = "rtlib", | 573 | .ident = "rtlib", |
| 574 | }, | 574 | }, |
| 575 | .{ | ||
| 576 | .name = "static", | ||
| 577 | .ident = "static", | ||
| 578 | }, | ||
| 579 | .{ | ||
| 580 | .name = "dynamic", | ||
| 581 | .ident = "dynamic", | ||
| 582 | }, | ||
| 575 | }; | 583 | }; |
| 576 | 584 | ||
| 577 | const blacklisted_options = [_][]const u8{}; | 585 | const blacklisted_options = [_][]const u8{}; |