rules_swift_package_manager
rules_swift_package_manager copied to clipboard
Support `system` target types
Looking for a popular package that leverages system targets (i.e, systemLibrary).
#235 was reported as a failure to support system targets. However, it turns out that the real issue was that targets were not being properly filtered out before build file generation. For instance, test targets and targets only associated with phantom products should not be built.
Hi! What about https://github.com/groue/GRDB.swift ?
@denis15yo Cool. Thanks. I will try to pick this up in the next couple of weeks.
This is a minimal BUILD file it seems we would need to get something like CSQLite generated (this is used in GRDB.swift for example):
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library_group", "swift_interop_hint")
swift_library_group(
name = "CSQLite",
deps = [
":CSQLite_system_library",
],
)
cc_library(
name = "CSQLite_system_library",
hdrs = ["shim.h"],
aspect_hints = [":CSQLite_swift_interop"],
)
swift_interop_hint(
name = "CSQLite_swift_interop",
module_map = "module.modulemap",
module_name = "CSQLite",
)