blob: 2b1ad9d5fb4bfac2d244f207b4ada16e4279517f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
Patch from:
https://github.com/libbpf/blazesym/commit/32f136b06b8b71110499073909dd238e577b23d0
From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
Date: Tue, 25 Mar 2025 10:10:56 +0100
Subject: [PATCH] capi: add capi feature to enable building with cargo-c
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Disable generating the header since it already exists,
and more importantly because we cannot run the required custom
cbindgen extension from cargo-c.
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
--- a/capi/Cargo.toml
+++ b/capi/Cargo.toml
@@ -36,6 +36,8 @@ crate-type = ["cdylib", "staticlib", "lib"]
default = [
"dwarf",
]
+# Required by cargo-c
+capi = []
# Check C code documentation snippets.
check-doc-snippets = []
# Enable this feature to enable blazesym's DWARF support.
@@ -46,6 +48,15 @@ dwarf = ["blazesym/dwarf"]
# changed.
generate-c-header = ["dep:cbindgen", "dep:which"]
+# cargo-c configuration:
+# skip header generation
+[package.metadata.capi.header]
+generation = false
+subdirectory = false
+# use the existing header for installation
+[package.metadata.capi.install.include]
+asset = [{ from="include/blazesym.h" }]
+
[[bench]]
name = "capi"
path = "benches/capi.rs"
|