Skip to content

Commit

Permalink
Fix test target on macOS with Bazel@HEAD
Browse files Browse the repository at this point in the history
supports_dynamic_linker feature was removed from cc toolchain for macOS,
cc_binary should be used to build shared library.

Context: bazelbuild/bazel#4341 (comment)
  • Loading branch information
meteorcloudy committed Jan 26, 2021
1 parent 4d4acaa commit 172772c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/cmake_with_data/lib_b/BUILD
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_library(
cc_binary(
name = "lib_b",
srcs = ["src/lib_b.cpp"],
hdrs = ["src/lib_b.h"],
linkstatic = False,
srcs = [
"src/lib_b.cpp",
"src/lib_b.h",
],
linkshared = True,
visibility = ["//cmake_with_data:__pkg__"],
)

0 comments on commit 172772c

Please sign in to comment.