Skip to content

Commit

Permalink
don't include srcs when compiling swiftinterfaces
Browse files Browse the repository at this point in the history
Summary: The srcs were being passed to swiftinterface file compilation, which is redundant. Set the `srcs` to an empty list to pass in to the swiftmodule compilation action and move the other input and output related flags into `cmd`.

Reviewed By: milend

Differential Revision: D67205435

fbshipit-source-id: 5ee7f8555a50a6aed83b6cc879d0bb40a047f652
  • Loading branch information
rmaz authored and facebook-github-bot committed Dec 17, 2024
1 parent e44aec3 commit 1bd21b2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions apple/swift/swift_compilation.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -491,17 +491,21 @@ def _compile_swiftmodule(

argfile_cmd = cmd_args(shared_flags)
argfile_cmd.add([
"-c",
"-Xfrontend",
"-compile-module-from-interface",
output_swiftinterface,
"-disable-cmo",
"-wmo",
])
cmd = cmd_args([
"-c",
"-Xfrontend",
"-compile-module-from-interface",
output_swiftinterface,
"-o",
output_swiftmodule.as_output(),
])

# We don't need the Swift srcs to compile a swiftmodule
# from a generated swiftinterface file.
srcs = []
else:
argfile_cmd = cmd_args(shared_flags)
argfile_cmd.add([
Expand Down

0 comments on commit 1bd21b2

Please sign in to comment.