blob: 7dae93699daafdf8604c4811e81fa496c7c30876 [file]
load("@io_bazel_rules_go//go:def.bzl", "go_binary")
load("@rules_shell//shell:sh_test.bzl", "sh_test")
go_binary(
name = "extldflags_rpath",
srcs = ["main.go"],
gc_linkopts = [
"-linkmode",
"external",
"-extldflags",
"-Wl,-rpath -Wl,/foo",
"-extldflags",
"-Wl,-rpath -Wl,/bar",
],
)
sh_test(
name = "extldflags_rpath_test",
size = "small",
srcs = ["extldflags_rpath_test.sh"],
args = ["$(location :extldflags_rpath)"],
data = [":extldflags_rpath"],
)