File tree Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Original file line number Diff line number Diff line change @@ -1059,11 +1059,6 @@ please file an issue at https://github.com/bazelbuild/apple_support/issues/new
1059
1059
),
1060
1060
],
1061
1061
),
1062
- flag_set (
1063
- actions = _DYNAMIC_LINK_ACTIONS ,
1064
- flag_groups = [flag_group (flags = ["-dead_strip" ])],
1065
- with_features = [with_feature_set (features = ["opt" ])],
1066
- ),
1067
1062
],
1068
1063
)
1069
1064
@@ -2077,6 +2072,18 @@ please file an issue at https://github.com/bazelbuild/apple_support/issues/new
2077
2072
],
2078
2073
)
2079
2074
2075
+ dead_strip_opt_feature = feature (
2076
+ name = "dead_strip_opt" ,
2077
+ enabled = True ,
2078
+ flag_sets = [
2079
+ flag_set (
2080
+ actions = _DYNAMIC_LINK_ACTIONS ,
2081
+ flag_groups = [flag_group (flags = ["-dead_strip" ])],
2082
+ with_features = [with_feature_set (features = ["opt" ])],
2083
+ ),
2084
+ ],
2085
+ )
2086
+
2080
2087
oso_prefix_feature = feature (
2081
2088
name = "oso_prefix_is_pwd" ,
2082
2089
enabled = True ,
@@ -2582,6 +2589,7 @@ please file an issue at https://github.com/bazelbuild/apple_support/issues/new
2582
2589
default_link_flags_feature ,
2583
2590
no_deduplicate_feature ,
2584
2591
dead_strip_feature ,
2592
+ dead_strip_opt_feature ,
2585
2593
apply_implicit_frameworks_feature ,
2586
2594
link_cocoa_feature ,
2587
2595
apply_simulator_compiler_flags_feature ,
Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ opt_test = make_action_command_line_test_rule(
13
13
},
14
14
)
15
15
16
+ opt_dead_strip_disabled_test = make_action_command_line_test_rule (
17
+ config_settings = {
18
+ "//command_line_option:compilation_mode" : "opt" ,
19
+ "//command_line_option:features" : [
20
+ "-dead_strip_opt" ,
21
+ ],
22
+ },
23
+ )
24
+
16
25
dead_strip_requested_test = make_action_command_line_test_rule (
17
26
config_settings = {
18
27
"//command_line_option:compilation_mode" : "fastbuild" ,
@@ -76,6 +85,23 @@ def linking_test_suite(name):
76
85
target_under_test = "//test/test_data:macos_binary" ,
77
86
)
78
87
88
+ opt_dead_strip_disabled_test (
89
+ name = "{}_opt_dead_strip_disabled_test" .format (name ),
90
+ tags = [name ],
91
+ expected_argv = [
92
+ "-Xlinker" ,
93
+ "-objc_abi_version" ,
94
+ "-Xlinker" ,
95
+ "2" ,
96
+ "-ObjC" ,
97
+ ],
98
+ not_expected_argv = [
99
+ "-dead_strip" ,
100
+ ],
101
+ mnemonic = "ObjcLink" ,
102
+ target_under_test = "//test/test_data:macos_binary" ,
103
+ )
104
+
79
105
dead_strip_requested_test (
80
106
name = "{}_dead_strip_requested_test" .format (name ),
81
107
tags = [name ],
You can’t perform that action at this time.
0 commit comments