2018-04-25 02:17:47 +00:00
|
|
|
# rules_foreign_cc
|
2021-01-24 23:23:19 +00:00
|
|
|
|
2021-02-12 23:05:18 +00:00
|
|
|
[![Build status](https://badge.buildkite.com/c28afbf846e2077715c753dda1f4b820cdcc46cc6cde16503c.svg?branch=main)](https://buildkite.com/bazel/rules-foreign-cc?branch=main)
|
2018-04-26 17:52:06 +00:00
|
|
|
|
2019-10-23 14:06:34 +00:00
|
|
|
**Rules for building C/C++ projects using foreign build systems inside Bazel projects.**
|
2018-04-26 17:52:06 +00:00
|
|
|
|
2019-10-23 14:06:34 +00:00
|
|
|
This is **not an officially supported Google product**
|
2018-04-26 17:52:06 +00:00
|
|
|
(meaning, support and/or new releases may be limited.)
|
|
|
|
|
2021-01-24 23:23:19 +00:00
|
|
|
## Documentation
|
|
|
|
|
2021-06-22 20:10:31 +00:00
|
|
|
Documentation for all rules and providers are available at: https://bazelbuild.github.io/rules_foreign_cc/
|
2021-01-24 23:23:19 +00:00
|
|
|
|
2019-01-29 13:52:47 +00:00
|
|
|
## Bazel versions compatibility
|
|
|
|
|
2023-06-09 10:29:12 +00:00
|
|
|
Works with Bazel after 4.2.0.
|
2022-11-09 11:54:39 +00:00
|
|
|
|
|
|
|
The following flags are required in Bazel 4.x but not Bazel 5.x or newer:
|
|
|
|
|
|
|
|
- `--experimental_enable_aggregating_middleman=False`
|
2021-01-25 19:07:05 +00:00
|
|
|
|
|
|
|
Note that the rules may be compatible with older versions of Bazel but support may break
|
|
|
|
in future changes as these older versions are not tested.
|
2019-01-29 13:55:29 +00:00
|
|
|
|
2023-10-14 13:24:09 +00:00
|
|
|
Note also that the `runnable_binary` macro requires bazel 5.4.0, for the `rlocationpath` [path
|
|
|
|
variable](https://bazel.build/reference/be/make-variables)
|
|
|
|
|
2019-03-11 15:34:56 +00:00
|
|
|
## News
|
2021-01-24 23:23:19 +00:00
|
|
|
|
2021-03-17 15:45:28 +00:00
|
|
|
For more generalized updates, please see [NEWS.md](./NEWS.md) or checkout the
|
|
|
|
[release notes](https://github.com/bazelbuild/rules_foreign_cc/releases) of current or previous releases
|
2019-01-18 17:06:10 +00:00
|
|
|
|
2021-01-24 23:23:19 +00:00
|
|
|
## Design document
|
2018-08-31 12:23:16 +00:00
|
|
|
|
2021-01-24 23:23:19 +00:00
|
|
|
[External C/C++ libraries rules](https://docs.google.com/document/d/1Gv452Vtki8edo_Dj9VTNJt5DA_lKTcSMwrwjJOkLaoU/edit?usp=sharing)
|
2021-02-26 20:21:13 +00:00
|
|
|
|
|
|
|
[ccb]: https://docs.bazel.build/versions/master/be/c-cpp.html#cc_binary
|
|
|
|
[ccl]: https://docs.bazel.build/versions/master/be/c-cpp.html#cc_library
|
|
|
|
[cct]: https://docs.bazel.build/versions/master/be/c-cpp.html#cc_toolchain
|
2021-11-29 10:54:06 +00:00
|
|
|
|
|
|
|
## Caveats
|
|
|
|
|
|
|
|
* FreeBSD support is currently experimental and on a best-effort basis.
|
|
|
|
Google currently doesn't have a CI test environment for FreeBSD,
|
|
|
|
but please make your voice heard by upvoting this
|
|
|
|
[issue](https://github.com/bazelbuild/continuous-integration/issues/258).
|