Add docs for clang-runtime feature
MODIFY
Cargo.toml
Cargo.toml
@@ -28,12 +28,12 @@ slab = "0.4"
[features]
default = ["opencv-4"]
buildtime-bindgen = ["binding-generator", "clang"]
+clang-runtime = ["binding-generator/clang-runtime"]
opencv-32 = []
opencv-34 = []
opencv-4 = []
contrib = []
docs-only = []
-clang-runtime = ["binding-generator/clang-runtime"]
[build-dependencies]
binding-generator = {package = "opencv-binding-generator", version = "0.9", path = "binding-generator", optional = true}

MODIFY
README.md
README.md
@@ -229,6 +229,10 @@ The following variables affect the building the of the `opencv` crate, but belon
6.0), should only be used during the crate development or when building on Windows or macOS, with this
feature enabled the bundled headers are no longer used for the code generation, the ones from the installed
OpenCV are used instead
+* `clang-runtime` - only useful with the combination with `buildtime-bindgen`, enables the runtime detection
+ of libclang (`runtime` feature of `clang-sys`). This makes the build slower because it impairs the parallel
+ generation of OpenCV modules. Useful as a workaround for when your dependencies (like `bindgen`) pull in
+ `clang-sys` with hard `runtime` feature. See also this [issue](https://github.com/twistedfall/opencv-rust/issues/129).
* `docs-only` - internal usage, for building docs on [docs.rs](https://docs.rs/opencv)
## API details

MODIFY
binding-generator/Cargo.toml
binding-generator/Cargo.toml
@@ -10,7 +10,6 @@ edition = "2018"
[lib]
[features]
-
clang-runtime = ["clang/runtime", "clang-sys/runtime"]
[dependencies]

MODIFY
ci/script.sh
ci/script.sh
@@ -65,6 +65,8 @@ CARGO_FEATURES="$CARGO_FEATURES,buildtime-bindgen"
cargo test -vv --no-default-features --features "$CARGO_FEATURES"
cargo test --release -vv --no-default-features --features "$CARGO_FEATURES"
+cargo test --release -vv --no-default-features --features "$CARGO_FEATURES,clang-runtime"
+
# on windows clang through `cc` crate fails because of -fPIC flag
if [[ "$OS_FAMILY" != "windows" ]]; then
export CXX=clang++
@@ -72,7 +74,3 @@ if [[ "$OS_FAMILY" != "windows" ]]; then
cargo test -vv --no-default-features --features "$CARGO_FEATURES"
cargo test --release -vv --no-default-features --features "$CARGO_FEATURES"
fi
-
-CARGO_FEATURES="$CARGO_FEATURES,clang-runtime"
-cargo test -vv --no-default-features --features "$CARGO_FEATURES"
-cargo test --release -vv --no-default-features --features "$CARGO_FEATURES"

Add docs for clang-runtime feature