Skip to content

Commit

Permalink
bazel: Give objc targets no source code to build on non-Darwin platfo…
Browse files Browse the repository at this point in the history
…rms.
  • Loading branch information
ivucica committed Mar 26, 2024
1 parent c539b76 commit a48a2b1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ cc_test(

cc_library(
name = "macutil",
srcs = ["objcmacutil.m.c"],
srcs = select({
"//conditions:default": [],
":darwin": ["objcmacutil.m.c"],
}),
hdrs = ["macutil.h"],
copts = [
"-x",
Expand All @@ -231,7 +234,10 @@ cc_library(

cc_library(
name = "macclipboard",
srcs = ["objcmacclipboard.m.c"],
srcs = select({
"//conditions:default": [],
":darwin": ["objcmacclipboard.m.c"],
}),
copts = [
"-x",
"objective-c",
Expand Down

0 comments on commit a48a2b1

Please sign in to comment.