From 3d95640e219b9b8f8c816e40d7616526ac7c4bc5 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Mon, 18 May 2026 17:56:28 +0000 Subject: [PATCH] Add `libcpp` feature This adds a `libcpp` feature, which in turn enables `libcpp` from the `clang-sys` crate. This allows bindgen to use `libc++` from LLVM instead of the system c++ standard library. --- bindgen-cli/Cargo.toml | 1 + bindgen/Cargo.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/bindgen-cli/Cargo.toml b/bindgen-cli/Cargo.toml index e5d49a6ecc..648fb7cb24 100644 --- a/bindgen-cli/Cargo.toml +++ b/bindgen-cli/Cargo.toml @@ -32,6 +32,7 @@ shlex.workspace = true default = ["logging", "runtime"] logging = ["bindgen/logging", "dep:env_logger", "dep:log"] static = ["bindgen/static"] +libcpp = ["bindgen/libcpp"] runtime = ["bindgen/runtime"] prettyplease = ["bindgen/prettyplease"] diff --git a/bindgen/Cargo.toml b/bindgen/Cargo.toml index 478574edb3..318afa10ac 100644 --- a/bindgen/Cargo.toml +++ b/bindgen/Cargo.toml @@ -46,6 +46,7 @@ syn = { workspace = true, features = ["full", "extra-traits", "visit-mut"] } default = ["logging", "prettyplease", "runtime"] logging = ["dep:log"] static = ["clang-sys/static"] +libcpp = ["clang-sys/libcpp"] runtime = ["clang-sys/runtime"] experimental = ["dep:annotate-snippets"]