rules_swift_package_manager
rules_swift_package_manager copied to clipboard
fix: usage of `copts` for `SWIFT_PACKAGE`
This primarily does two changes:
- Passes
-Xcc -DSWIFT_PACKAGEfor the Swift library target generatedcoptsattribute. - Removes de-duplication in
bzl_selects.bzl- This is required because
copts = ["-DSWIFT_PACKAGE", "-Xcc", "-DSWIFT_PACKAGE"]are valid copts but would get de-duplicated intocopts = ["-DSWIFT_PACKAGE", "-Xcc"]
- This is required because
Fixes #1259
Added an example repo and example in: https://github.com/cgrindel/rules_swift_package_manager/pull/1261
I'll need to update this because we do want to dedupe some attrs (like deps) across configs/defaults but not copt. Going to look at making a new method for this
@cgrindel this should be ready now, I updated the PR description and the example in #1261 that can be added after this merges.