Always link C++ objects into the surrounding Rust library
diff --git a/BUCK b/BUCK
index 8fde438..e4175b8 100644
--- a/BUCK
+++ b/BUCK
@@ -51,6 +51,7 @@
},
exported_linker_flags = ["-lstdc++"],
header_namespace = "rust",
+ preferred_linkage = "static",
visibility = ["PUBLIC"],
)
diff --git a/demo/BUCK b/demo/BUCK
index 8b3990c..fe610fb 100644
--- a/demo/BUCK
+++ b/demo/BUCK
@@ -21,6 +21,7 @@
name = "blobstore-sys",
srcs = ["src/blobstore.cc"],
compiler_flags = ["-std=c++14"],
+ preferred_linkage = "static",
deps = [
":blobstore-include",
":bridge/include",
diff --git a/tests/BUCK b/tests/BUCK
index 865eebc..9a7b56c 100644
--- a/tests/BUCK
+++ b/tests/BUCK
@@ -38,6 +38,7 @@
"ffi/module.rs.h": ":module/header",
"ffi/tests.h": "ffi/tests.h",
},
+ preferred_linkage = "static",
)
rust_cxx_bridge(