Skip to content

Commit 282dd5d

Browse files
strip_test: use consistent shared library names on Darwin (#89)
On Darwin, the library name stamped into the shared object's Mach-O header should match its file name, otherwise it won't be loadable at run time. Ensure this is the case for the shared objects in `//test/strip`.
1 parent 61de6f0 commit 282dd5d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/strip/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for strip in [True, False]:
1818
srcs = ["so.c"],
1919
out = f"libc_so_{stripped}.so",
2020
hdrs = ["so.h"],
21-
linker_flags = [f"-install_name @rpath/lib_c_{stripped}.so"] if CONFIG.OS == "darwin" else [],
21+
linker_flags = [f"-install_name @rpath/libc_so_{stripped}.so"] if CONFIG.OS == "darwin" else [],
2222
strip = strip,
2323
)
2424
data[f"c_binary_{stripped}"] = c_binary(
@@ -34,7 +34,7 @@ for strip in [True, False]:
3434
srcs = ["so.cpp"],
3535
out = f"libcc_so_{stripped}.so",
3636
hdrs = ["so.hpp"],
37-
linker_flags = [f"-install_name @rpath/lib_cc_{stripped}.so"] if CONFIG.OS == "darwin" else [],
37+
linker_flags = [f"-install_name @rpath/libcc_so_{stripped}.so"] if CONFIG.OS == "darwin" else [],
3838
strip = strip,
3939
)
4040
data[f"cc_binary_{stripped}"] = cc_binary(

0 commit comments

Comments
 (0)