• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("@io_bazel_rules_go//go:def.bzl", "go_binary")
2
3go_binary(
4    name = "extldflags_rpath",
5    srcs = ["main.go"],
6    gc_linkopts = [
7        "-linkmode",
8        "external",
9        "-extldflags",
10        "-Wl,-rpath -Wl,/foo",
11        "-extldflags",
12        "-Wl,-rpath -Wl,/bar",
13    ],
14)
15
16sh_test(
17    name = "extldflags_rpath_test",
18    size = "small",
19    srcs = ["extldflags_rpath_test.sh"],
20    args = ["$(location :extldflags_rpath)"],
21    data = [":extldflags_rpath"],
22)
23