...
1load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
2
3go_library(
4 name = "cgolib",
5 srcs = [
6 "asm.S",
7 "foo.c",
8 "foo.go",
9 "foo.h",
10 "pure.go",
11 ],
12 _gazelle_imports = [
13 "example.com/repo/lib",
14 "example.com/repo/lib/deep",
15 "fmt",
16 ],
17 cgo = True,
18 clinkopts = ["-lweird,-rpath,$$ORIGIN"],
19 copts = [
20 "-I cgolib/sub -iquote cgolib/sub",
21 "-Icgolib/sub -Icgolib/othersub",
22 ],
23 cppopts = ["-I/weird/include/path"],
24 cxxopts = ["-std=c++14"],
25 importpath = "example.com/repo/cgolib",
26 visibility = ["//visibility:public"],
27)
28
29go_test(
30 name = "cgolib_test",
31 srcs = ["foo_test.go"],
32 _gazelle_imports = ["testing"],
33 embed = [":cgolib"],
34)
View as plain text