File tree Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -693,10 +693,7 @@ def compile_action_configs():
693
693
694
694
# Configure index-while-building.
695
695
swift_toolchain_config .action_config (
696
- actions = [
697
- swift_action_names .COMPILE ,
698
- swift_action_names .DERIVE_FILES ,
699
- ],
696
+ actions = [swift_action_names .COMPILE ],
700
697
configurators = [_index_while_building_configurator ],
701
698
features = [SWIFT_FEATURE_INDEX_WHILE_BUILDING ],
702
699
),
Original file line number Diff line number Diff line change @@ -56,6 +56,14 @@ split_swiftmodule_skip_function_bodies_test = make_action_command_line_test_rule
56
56
],
57
57
},
58
58
)
59
+ split_swiftmodule_indexing_test = make_action_command_line_test_rule (
60
+ config_settings = {
61
+ "//command_line_option:features" : [
62
+ "swift.index_while_building" ,
63
+ "swift.split_derived_files_generation" ,
64
+ ],
65
+ },
66
+ )
59
67
60
68
def split_derived_files_test_suite (name = "split_derived_files" ):
61
69
"""Test suite for split derived files options.
@@ -220,6 +228,34 @@ def split_derived_files_test_suite(name = "split_derived_files"):
220
228
target_under_test = "@build_bazel_rules_swift//test/fixtures/debug_settings:simple" ,
221
229
)
222
230
231
+ split_swiftmodule_indexing_test (
232
+ name = "{}_object_only_indexing" .format (name ),
233
+ expected_argv = [
234
+ "-emit-object" ,
235
+ "-index-store-path" ,
236
+ ],
237
+ mnemonic = "SwiftCompile" ,
238
+ not_expected_argv = [
239
+ "-emit-module-path" ,
240
+ ],
241
+ tags = [name ],
242
+ target_under_test = "@build_bazel_rules_swift//test/fixtures/debug_settings:simple" ,
243
+ )
244
+
245
+ split_swiftmodule_indexing_test (
246
+ name = "{}_swiftmodule_only_indexing" .format (name ),
247
+ expected_argv = [
248
+ "-emit-module-path" ,
249
+ ],
250
+ mnemonic = "SwiftDeriveFiles" ,
251
+ not_expected_argv = [
252
+ "-emit-object" ,
253
+ "-index-store-path" ,
254
+ ],
255
+ tags = [name ],
256
+ target_under_test = "@build_bazel_rules_swift//test/fixtures/debug_settings:simple" ,
257
+ )
258
+
223
259
native .test_suite (
224
260
name = name ,
225
261
tags = [name ],
You can’t perform that action at this time.
0 commit comments