Skip to content

Commit 9bc57fa

Browse files
authored
feat(toolchain): add missing action types to toolchain configs (#1611)
The -target option should be added to the same actions, regardless of whether we're declaring an Xcode toolchain or a standalone toolchain. This commit brings the Linux actions up-to-date with the Xcode ones. While we're at it, we're also adding -target to the MODULEWRAP action to both Xcode and non-Xcode actions. It looks like it's ok to omit it if the target arch is the same as the host arch, but if they're different swiftc will return an error.
1 parent 7c43eb0 commit 9bc57fa

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

swift/toolchains/swift_toolchain.bzl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ load(
4040
"//swift/internal:action_names.bzl",
4141
"SWIFT_ACTION_AUTOLINK_EXTRACT",
4242
"SWIFT_ACTION_COMPILE",
43+
"SWIFT_ACTION_COMPILE_MODULE_INTERFACE",
4344
"SWIFT_ACTION_DERIVE_FILES",
4445
"SWIFT_ACTION_DUMP_AST",
4546
"SWIFT_ACTION_MODULEWRAP",
4647
"SWIFT_ACTION_PRECOMPILE_C_MODULE",
4748
"SWIFT_ACTION_SYMBOL_GRAPH_EXTRACT",
49+
"SWIFT_ACTION_SYNTHESIZE_INTERFACE",
4850
)
4951
load("//swift/internal:attrs.bzl", "swift_toolchain_driver_attrs")
5052
load("//swift/internal:autolinking.bzl", "autolink_extract_action_configs")
@@ -194,7 +196,14 @@ def _all_action_configs(os, arch, target_triple, sdkroot, xctest_version, additi
194196
action_configs = [
195197
ActionConfigInfo(
196198
actions = [
199+
SWIFT_ACTION_COMPILE,
200+
SWIFT_ACTION_COMPILE_MODULE_INTERFACE,
201+
SWIFT_ACTION_DERIVE_FILES,
202+
SWIFT_ACTION_DUMP_AST,
203+
SWIFT_ACTION_MODULEWRAP,
204+
SWIFT_ACTION_PRECOMPILE_C_MODULE,
197205
SWIFT_ACTION_SYMBOL_GRAPH_EXTRACT,
206+
SWIFT_ACTION_SYNTHESIZE_INTERFACE,
198207
],
199208
configurators = [
200209
add_arg("-target", target_triples.str(target_triple)),

swift/toolchains/xcode_swift_toolchain.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ load(
4343
"SWIFT_ACTION_COMPILE_MODULE_INTERFACE",
4444
"SWIFT_ACTION_DERIVE_FILES",
4545
"SWIFT_ACTION_DUMP_AST",
46+
"SWIFT_ACTION_MODULEWRAP",
4647
"SWIFT_ACTION_PRECOMPILE_C_MODULE",
4748
"SWIFT_ACTION_SYMBOL_GRAPH_EXTRACT",
4849
"SWIFT_ACTION_SYNTHESIZE_INTERFACE",
@@ -333,6 +334,7 @@ def _all_action_configs(
333334
SWIFT_ACTION_COMPILE_MODULE_INTERFACE,
334335
SWIFT_ACTION_DERIVE_FILES,
335336
SWIFT_ACTION_DUMP_AST,
337+
SWIFT_ACTION_MODULEWRAP,
336338
SWIFT_ACTION_PRECOMPILE_C_MODULE,
337339
SWIFT_ACTION_SYMBOL_GRAPH_EXTRACT,
338340
SWIFT_ACTION_SYNTHESIZE_INTERFACE,

0 commit comments

Comments
 (0)