| load("//bazel:macros.bzl", "generated_cc_atom") |
| load("@rules_cc//cc:defs.bzl", "cc_binary") |
| load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| |
| 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"], |
| ) |