Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 12 additions & 42 deletions fedora_patches/rust-clanglib.patch
Original file line number Diff line number Diff line change
@@ -1,62 +1,32 @@
diff -up chromium-135.0.7049.84/build/config/clang/BUILD.gn.than chromium-135.0.7049.84/build/config/clang/BUILD.gn
--- chromium-135.0.7049.84/build/config/clang/BUILD.gn.than 2025-04-09 10:22:51.699058451 +0200
+++ chromium-135.0.7049.84/build/config/clang/BUILD.gn 2025-04-09 10:43:06.524085005 +0200
@@ -166,8 +166,8 @@ template("clang_lib") {
_prefix = "lib"
_suffix = ""
_ext = "a"
+ _libprefix = ""

- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
if (is_win) {
_dir = "windows"
_prefix = ""
@@ -197,7 +197,33 @@ template("clang_lib") {
} else {
assert(false) # Unhandled cpu type
diff -up chromium-141.0.7390.37/build/config/clang/BUILD.gn.rust-clang_lib chromium-141.0.7390.37/build/config/clang/BUILD.gn
--- chromium-141.0.7390.37/build/config/clang/BUILD.gn.rust-clang_lib 2025-09-23 22:21:14.000000000 +0200
+++ chromium-141.0.7390.37/build/config/clang/BUILD.gn 2025-09-27 12:15:44.380395911 +0200
@@ -168,7 +168,21 @@ template("clang_lib") {
}
} else if (is_apple) {
_dir = "darwin"
- } else if (is_linux || is_chromeos) {
+ } else if (is_linux) {
+ if (current_cpu == "x64") {
+ _dir = "x86_64-redhat-linux-gnu"
+ _suffix ="-x86_64"
+ } else if (current_cpu == "x86") {
+ _dir = "i386-redhat-linux-gnu"
+ _suffix = "-i386"
+ } else if (current_cpu == "arm64") {
+ _dir = "aarch64-redhat-linux-gnu"
+ _suffix = "-aarch64"
+ } else if (current_cpu == "arm") {
+ _dir = "armhf-redhat-linux-gnu"
+ _suffix = "-armhf"
+ } else if (current_cpu == "ppc64") {
+ _dir = "ppc64le-redhat-linux-gnu"
+ _suffix = "-ppc64le"
+ } else {
+ assert(false) # Unhandled cpu type
+ }
+ # different clang lib dir in fedora/epel
+ if (clang_version >= 17) {
+ _suffix = ""
+ } else if (clang_version >= 14) {
+ _libprefix = "64"
+ _dir = ""
+ }
+ } else if (is_chromeos) {
if (current_cpu == "x64") {
_dir = "x86_64-unknown-linux-gnu"
} else if (current_cpu == "x86") {
@@ -236,6 +262,7 @@ template("clang_lib") {
assert(false) # Unhandled target platform
}

+ _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib"
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]

diff -up chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni.than chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni
--- chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni.than 2025-04-09 10:46:48.772413981 +0200
+++ chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni 2025-04-09 10:47:15.480900587 +0200
diff -up chromium-141.0.7390.37/build/rust/rust_bindgen_generator.gni.rust-clang_lib chromium-141.0.7390.37/build/rust/rust_bindgen_generator.gni
--- chromium-141.0.7390.37/build/rust/rust_bindgen_generator.gni.rust-clang_lib 2025-09-23 22:21:14.000000000 +0200
+++ chromium-141.0.7390.37/build/rust/rust_bindgen_generator.gni 2025-09-27 11:41:29.777786734 +0200
@@ -18,11 +18,11 @@ if (host_os == "win") {

# On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
Expand All @@ -71,9 +41,9 @@ diff -up chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni.than chrom
}

# Template to build Rust/C bindings with bindgen.
diff -up chromium-135.0.7049.84/build/rust/rust_bindgen.gni.than chromium-135.0.7049.84/build/rust/rust_bindgen.gni
--- chromium-135.0.7049.84/build/rust/rust_bindgen.gni.than 2025-04-09 10:45:53.577078718 +0200
+++ chromium-135.0.7049.84/build/rust/rust_bindgen.gni 2025-04-09 10:46:29.974649891 +0200
diff -up chromium-141.0.7390.37/build/rust/rust_bindgen.gni.rust-clang_lib chromium-141.0.7390.37/build/rust/rust_bindgen.gni
--- chromium-141.0.7390.37/build/rust/rust_bindgen.gni.rust-clang_lib 2025-09-23 22:21:14.000000000 +0200
+++ chromium-141.0.7390.37/build/rust/rust_bindgen.gni 2025-09-27 11:41:29.777891843 +0200
@@ -19,11 +19,11 @@ if (host_os == "win") {

# On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
Expand Down