skia2/experimental/bazel_test/BUILD.bazel
Kevin Lubick 46eaab3959 [bazel] Add shims to help translation into G3
Ran the following commands:
find -name "BUILD.bazel" -exec sed -i -e '1iload("//bazel:macros.bzl", "cc_library", "exports_files_legacy")\nexports_files_legacy()' {} +
buildifier --lint=fix --mode=fix -r .

This had the effect of making sure we can export all of our
files in G3 (until we no longer have legacy targets) and
making all of our cc_libraries shim-able.

bazel/macros.bzl has the human-contributed changes, the rest
were mechanical.

Change-Id: I8e24e30e74b038cfd072cdbe4078bfd1d213dd46
Bug: skia:13211
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/535359
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-04-29 19:27:54 +00:00

45 lines
1.1 KiB
Python

load("//bazel:macros.bzl", "enforce_iwyu_on_package", "exports_files_legacy", "generated_cc_atom")
load("@rules_cc//cc:defs.bzl", "cc_binary")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
exports_files_legacy()
licenses(["notice"])
enforce_iwyu_on_package()
cc_binary(
name = "bazel_test_exe",
visibility = ["//:__subpackages__"],
deps = [
":bazel_test_src",
] + select({
"@platforms//os:windows": ["//src/ports:SkDebug_win_src"],
"@platforms//os:android": ["//src/ports:SkDebug_android_src"],
"//conditions:default": ["//src/ports:SkDebug_stdio_src"],
}),
)
generated_cc_atom(
name = "bazel_test_src",
srcs = ["bazel_test.cpp"],
visibility = ["//:__subpackages__"],
deps = [
"//include/core:SkTypes_hdr",
"//third_party:libpng",
],
)
go_binary(
name = "hello_world",
embed = [":bazel_test_lib"],
visibility = ["//visibility:public"],
)
go_library(
name = "bazel_test_lib",
srcs = ["hello_world.go"],
importpath = "go.skia.org/skia/experimental/bazel_test",
visibility = ["//visibility:private"],
)