Commit a6c388d
committed
vhost: add build.rs file to fix docs.rs build
When using `vhost` crate as a dependency, (e.g. in vhost-user-backend),
RUSTDOC_disable_feature_compat_errors is not set for the docs.rs build.
We must detect it in the build script using DOCS_RS env var.
Otherwise, building vhost-user-backend in docs.rs fails with:
error: Both `postcopy` and `xen` features can not be enabled at the same time.
--> vhost/src/lib.rs:63:1
|
63 | compile_error!("Both `postcopy` and `xen` features can not be enabled at the same time.");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Also add the same build.rs file for vhost-user-backend since it uses the
same cfg.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>1 parent 4770776 commit a6c388d
2 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments