rules_swift
rules_swift copied to clipboard
Bazel rules to build Swift on Apple and Linux platforms
We should provide a way to build a .dylib/.so from Swift code instead of just an executable binary. `cc_binary` does this via the `linkshared` attribute (and requiring a specific name...
Bazel's [platforms](https://docs.bazel.build/versions/master/platforms.html) and [toolchains](https://docs.bazel.build/versions/master/toolchains.html) APIs are the right way going forward to express the toolchains that we create, rather than the ad-hoc mechanism we currently have. Let's migrate to it...
A.swift ``` public class A { public init() {} } ``` B.swift ``` import A public class B { let a: A = .init() public init() {} } ``` C.swift...
When you have targets like these: ```bzl load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") cc_library( name = "cclib", srcs = ["ccfoo.cc"], linkopts = ["-some-flag-that-should-break-linking"], tags = ["swift_module"], ) swift_library( name = "swiftlib", srcs...
If you have a pre-compiled framework vended by `apple_static_framework_import` in the root of your WORKSPACE, if you depend on it from a `swift_library` rule you will get a strange build...
Uses the newer `-experimental-skip-non-inlinable-function-bodies-without-types` which was introduced here: https://github.com/apple/swift/pull/34612. This should improve LLDB usage in some cases. When using WMO, it has two downsides in Swift 5.5, both introduced by...
The repository rule on Linux should detect if the Swift toolchain is not already on the path; if that's the case, and if the user is running one of the...
Add a new `pbswift_files` output group in order to consume the generated `pbswift` files in macros for instance Switch from `FileNaming=FullPath` to `FileNaming=PathToUnderscores` When compiling `pbswift` files, the linker complains...
Currently, num-threads is hardcoded to 12. This PR sets the value to the number of cores return by sysctl, or "host threads". This may improve vertical scaling in some situations...