aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/cpp.md
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-05-29 14:11:41 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2015-06-01 15:47:47 +0000
commit0efd26fe8ecc612b0a36784f38848265e62ff013 (patch)
tree903646681c233c1d6a0b262fceeb795e2ee85b92 /site/docs/cpp.md
parent568b2f23bff9169c156109d83b793dcfca0954c8 (diff)
Add documentation on depending on precompiled C++ libraries
-- MOS_MIGRATED_REVID=94756225
Diffstat (limited to 'site/docs/cpp.md')
-rw-r--r--site/docs/cpp.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/site/docs/cpp.md b/site/docs/cpp.md
index 1d32d4eed6..72463d6591 100644
--- a/site/docs/cpp.md
+++ b/site/docs/cpp.md
@@ -223,3 +223,20 @@ cc_test(
```
You can then use `bazel test` to run the test.
+
+
+Adding dependencies on precompiled libraries
+--------------------------------------------
+
+If you want to use a library that you only have a compiled version of (e.g.,
+headers and a .so) wrap it in a `cc_library` rule:
+
+```python
+cc_library(
+ name = "mylib",
+ srcs = ["mylib.so"],
+ hdrs = ["mylib.h"],
+)
+```
+
+Then other C++ targets in your workspace can depend on this rule.