File chromium-127-rust-clanglib.patch of Package ungoogled-chromium
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.
@@ -135,6 +135,13 @@
deps += [ ":${_rust_bindgen_generator_target_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" ]
+ }
+
rustflags = [
# Don't warn about unused code in the generated bindings.
"-Adead_code",
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) {