[swift] Add bazel configuration for Swift (#7195)

* [swift] Add bazel configuration for Swift

This change adds a simple bazel BUILD file for consuming the Swift
support. This also bumps the platforms bazel repo to fix support for M1s
and bazel 5.1+ https://github.com/bazelbuild/bazel/issues/15099#issuecomment-1075368289

The rules_swift inclusion here must happen before gRPC to ensure we
don't pull in an older version.

* Add CC=clang which is a requirement for Swift on Linux

* Add Swift to PATH
This commit is contained in:
Keith Smiley
2022-03-29 21:30:33 -07:00
committed by GitHub
parent 7fd8576233
commit fec1a8d015
3 changed files with 54 additions and 0 deletions

7
swift/BUILD.bazel Normal file
View File

@@ -0,0 +1,7 @@
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
swift_library(
name = "swift",
srcs = glob(["Sources/FlatBuffers/*.swift"]),
module_name = "FlatBuffers",
)