diff --git a/.bazelrc b/.bazelrc index edae406..ca6d940 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,4 +1 @@ -# Force the tests to not run in sandboxed mode, since it can introduce -# errors and flakes. -test --spawn_strategy=local build --macos_minimum_os=10.9 diff --git a/BUILD b/BUILD index 91ace76..fa05a13 100644 --- a/BUILD +++ b/BUILD @@ -1,31 +1,26 @@ -load( - "@rules_cc//cc:defs.bzl", - "cc_library" -) -load( - "@build_bazel_rules_swift//swift:swift.bzl", - "swift_library" -) +load("@rules_cc//cc:defs.bzl", "cc_library") +load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") cc_library( name = "CYaml", - srcs = glob(["Sources/CYaml/src/*.c", "Sources/CYaml/src/*.h"]), + srcs = glob([ + "Sources/CYaml/src/*.c", + "Sources/CYaml/src/*.h", + ]), hdrs = ["Sources/CYaml/include/yaml.h"], + # Requires because of https://github.com/bazelbuild/bazel/pull/10143 otherwise host transition builds fail + copts = ["-fPIC"], includes = ["Sources/CYaml/include"], - visibility = [ - "//Tests:__subpackages__", - ], + linkstatic = True, + tags = ["swift_module"], + visibility = ["//Tests:__subpackages__"], ) swift_library( name = "Yams", - module_name = "Yams", srcs = glob(["Sources/Yams/*.swift"]), - copts = [ - "-DSWIFT_PACKAGE", - ], - visibility = [ - "//visibility:public" - ], + copts = ["-DSWIFT_PACKAGE"], + module_name = "Yams", + visibility = ["//visibility:public"], deps = ["//:CYaml"], ) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92968de..6a66835 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ * Update Bazel config to allow targets to be directly consumed. [Maxwell Elliott](https://github.com/maxwellE) +* Fix some Bazel integration issues + [Keith Smiley](https://github.com/keith) ##### Bug Fixes