File chromium-127-rust-clanglib.patch of Package chromium.19316
Index: chromium-144.0.7524.0/build/rust/rust_bindgen.gni
===================================================================
--- chromium-144.0.7524.0.orig/build/rust/rust_bindgen.gni
+++ chromium-144.0.7524.0/build/rust/rust_bindgen.gni
@@ -26,7 +26,7 @@ if (!use_chromium_rust_toolchain &&
} else if (host_os == "win") {
_libclang_path += "/bin"
} else {
- _libclang_path += "/lib"
+ _libclang_path += "/lib64"
}
# Template to build Rust/C bindings with bindgen.
@@ -129,6 +129,13 @@ template("rust_bindgen") {
deps += [ ":${_rust_bindgen_generator_name}_static_fns" ]
}
+ # Default configs include "-fvisibility=hidden", and for some reason this
+ # causes bindgen not to emit function bindings. Override it.
+ args = []
+ if (!is_win) {
+ args += [ "-fvisibility=default" ]
+ }
+
if (defined(cpp) && cpp) {
# This cfg is used to control the bindings public export.
rustflags = [
Index: chromium-144.0.7524.0/build/rust/rust_bindgen_generator.gni
===================================================================
--- chromium-144.0.7524.0.orig/build/rust/rust_bindgen_generator.gni
+++ chromium-144.0.7524.0/build/rust/rust_bindgen_generator.gni
@@ -33,7 +33,7 @@ if (!use_chromium_rust_toolchain &&
} else if (host_os == "win") {
_libclang_path += "/bin"
} else {
- _libclang_path += "/lib"
+ _libclang_path += "/lib64"
}
# Template to build Rust/C bindings with bindgen.
@@ -269,6 +269,8 @@ template("rust_bindgen_generator") {
# causes bindgen not to emit function bindings. Override it.
if (!is_win) {
args += [ "-fvisibility=default" ]
+ args += [ "-I/usr/include/c++/v1" ]
+ args += [ "-I/usr/lib64/clang/" + clang_version + "/include" ]
}
if (is_win) {