Skip to content

Commit b817892

Browse files
committed
macos rpath
1 parent 7a40853 commit b817892

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/venv_site_packages_libs/ext_with_libs/BUILD.bazel

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,20 @@ cc_shared_library(
4242
# 3. Ensures libincrement.so is available at link time to satisfy (2)
4343
dynamic_deps = [":increment"],
4444
shared_lib_name = "adder.so",
45+
# NOTE: cc_shared_library adds Bazelized rpath entries, too.
4546
user_link_flags = [
46-
# NOTE: cc_shared_library adds Bazelized rpath entries, too.
47-
"-Wl,-rpath,$ORIGIN/libs",
4847
] + select({
4948
"@platforms//os:osx": [
49+
"-Wl,-rpath,@loader_path/libs",
5050
"-undefined",
5151
"dynamic_lookup",
5252
"-Wl,-exported_symbol",
5353
"-Wl,_PyInit_adder",
5454
],
55-
"//conditions:default": [],
55+
# Assume linux default
56+
"//conditions:default": [
57+
"-Wl,-rpath,$ORIGIN/libs",
58+
],
5659
}),
5760
deps = [":adder_impl"],
5861
)

0 commit comments

Comments
 (0)