Skip to content

Commit 60f85d8

Browse files
committed
Always link C++ objects into the surrounding Rust library
1 parent 5255af9 commit 60f85d8

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

BUCK

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ cxx_library(
5151
},
5252
exported_linker_flags = ["-lstdc++"],
5353
header_namespace = "rust",
54+
preferred_linkage = "static",
5455
visibility = ["PUBLIC"],
5556
)
5657

demo/BUCK

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ cxx_library(
2121
name = "blobstore-sys",
2222
srcs = ["src/blobstore.cc"],
2323
compiler_flags = ["-std=c++14"],
24+
preferred_linkage = "static",
2425
deps = [
2526
":blobstore-include",
2627
":bridge/include",

tests/BUCK

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ cxx_library(
3838
"ffi/module.rs.h": ":module/header",
3939
"ffi/tests.h": "ffi/tests.h",
4040
},
41+
preferred_linkage = "static",
4142
)
4243

4344
rust_cxx_bridge(

0 commit comments

Comments
 (0)