Skip to content

Commit

Permalink
Add back the special handling the for the SWIFTPM_MODULE_BUNDLE.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrindel committed Sep 28, 2024
1 parent 4537766 commit 1c2dda0
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions swiftpkg/internal/swiftpkg_build_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -260,23 +260,23 @@ def _clang_target_build_file(repository_ctx, pkg_ctx, target):
clang_apple_res_bundle_info.bundle_label_name,
))
if clang_apple_res_bundle_info.objc_accessor_hdr_label_name:
# srcs.extend([
# ":{}".format(
# clang_apple_res_bundle_info.objc_accessor_hdr_label_name,
# ),
# # NOTE: We add the implementation below based upon what
# # type of target is using the implementation.
# ])
srcs.extend([
":{}".format(
clang_apple_res_bundle_info.objc_accessor_hdr_label_name,
),
# NOTE: We add the implementation as a dependency on a target
# that compiles the implementation.
])
deps.append(":" + clang_apple_res_bundle_info.objc_accessor_library_label_name)

# # SPM provides a SWIFTPM_MODULE_BUNDLE macro to access the bundle for
# # ObjC code. The header file contains the macro definition. It needs
# # to be available in every Objc source file. So, we specify the
# # -include flag specifying the header path.
# # https://github.com/apple/swift-package-manager/blob/8387798811c6cc43761c5e1b48df2d3412dc5de4/Sources/Build/BuildDescription/ClangTargetBuildDescription.swift#L390
# res_copts.append("-include$(location :{})".format(
# clang_apple_res_bundle_info.objc_accessor_hdr_label_name,
# ))
# SPM provides a SWIFTPM_MODULE_BUNDLE macro to access the bundle for
# ObjC code. The header file contains the macro definition. It needs
# to be available in every Objc source file. So, we specify the
# -include flag specifying the header path.
# https://github.com/apple/swift-package-manager/blob/8387798811c6cc43761c5e1b48df2d3412dc5de4/Sources/Build/BuildDescription/ClangTargetBuildDescription.swift#L390
res_copts.append("-include$(location :{})".format(
clang_apple_res_bundle_info.objc_accessor_hdr_label_name,
))

local_includes = [
bzl_selects.new(value = p, kind = _condition_kinds.private_includes)
Expand Down

0 comments on commit 1c2dda0

Please sign in to comment.