@IEPforAUR As monarc99 already commented, the Chromium development versions (which ungoogled-Chromium is based on) are originally developed with clang 13 (trunk versions) in mind.
So in Manjaro, you have two options:
1) Set the source to compile using the toolchain supplied by the Chromium developers, which includes clang 13 trunk.
To achieve this, you will have to make the following modifications to PKGBUILD
(taken from the chromium-dev
AUR package):
_clang_path="${BUILDDIR}${_builddir}/src/chromium-${pkgver}/third_party/llvm-build/Release+Asserts/bin/"
export CC="${_clang_path}clang"
export CXX="${_clang_path}clang++"
export AR="${_clang_path}llvm-ar"
export NM=nm
export RANLIB=/usr/bin/true
_lld="ld.lld"
msg2 "Download prebuilt clang from Google"
tools/clang/scripts/update.py
2) You can try to compile the sources with clang 12 but they must be patched:
--- a/build/config/compiler/BUILD.gn 2021-08-04 15:33:17.770055119 +0200
+++ b/build/config/compiler/BUILD.gn 2021-08-04 15:33:58.576421902 +0200
@@ -1228,7 +1228,9 @@
} else {
# -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
# and -fcoverage-compilation-dir=.
- cflags += [ "-ffile-compilation-dir=." ]
+ # recognized by clang > 14 only
+ # cflags += [ "-ffile-compilation-dir=." ]
+ cflags += [ "-fdebug-compilation-dir=." ]
}
if (!is_win) {
# We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
--- a/build/config/sanitizers/BUILD.gn 2021-08-20 16:26:39.534393242 +0200
+++ b/build/config/sanitizers/BUILD.gn 2021-08-20 16:30:43.165895367 +0200
@@ -276,7 +276,7 @@
asan_win_blocklist_path =
rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
}
- cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
+ cflags += [ "-fsanitize-blacklist=$asan_win_blocklist_path" ]
}
}
}
@@ -312,7 +312,7 @@
}
cflags += [
"-fsanitize=cfi-vcall",
- "-fsanitize-ignorelist=$cfi_ignorelist_path",
+ "-fsanitize-blacklist=$cfi_ignorelist_path",
]
if (use_cfi_cast) {
@@ -416,7 +416,7 @@
cflags = [
"-fsanitize=memory",
"-fsanitize-memory-track-origins=$msan_track_origins",
- "-fsanitize-ignorelist=$msan_ignorelist_path",
+ "-fsanitize-blacklist=$msan_ignorelist_path",
]
}
}
@@ -430,7 +430,7 @@
}
cflags = [
"-fsanitize=thread",
- "-fsanitize-ignorelist=$tsan_ignorelist_path",
+ "-fsanitize-blacklist=$tsan_ignorelist_path",
]
}
}
@@ -456,7 +456,7 @@
"-fsanitize=signed-integer-overflow",
"-fsanitize=unreachable",
"-fsanitize=vla-bound",
- "-fsanitize-ignorelist=$ubsan_ignorelist_path",
+ "-fsanitize-blacklist=$ubsan_ignorelist_path",
]
# Chromecast ubsan builds fail to compile with these
@@ -495,7 +495,7 @@
"-fsanitize=shift",
"-fsanitize=signed-integer-overflow",
"-fsanitize=vla-bound",
- "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
+ "-fsanitize-blacklist=$ubsan_security_ignorelist_path",
]
}
}
@@ -514,7 +514,7 @@
}
cflags = [
"-fsanitize=vptr",
- "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
+ "-fsanitize-blacklist=$ubsan_vptr_ignorelist_path",
]
}
}
--- a/build/config/sanitizers/sanitizers.gni 2021-08-20 13:32:46.380117649 +0200
+++ b/build/config/sanitizers/sanitizers.gni 2021-08-20 14:04:17.785744980 +0200
@@ -55,10 +55,11 @@
# crbug.com/1033839. Similarly, don't use this on ARC builds.
#
# TODO(crbug.com/1159424): Reassess the validity of the next expression.
- is_cfi =
- is_official_build &&
- (((target_os == "linux" || is_chromeos_lacros) && target_cpu == "x64") ||
- ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device))
+ is_cfi = false
+ # is_cfi =
+ # is_official_build &&
+ # (((target_os == "linux" || is_chromeos_lacros) && target_cpu == "x64") ||
+ # ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device))
# Enable checks for indirect function calls via a function pointer.
# TODO(pcc): remove this when we're ready to add these checks by default.
Pinned Comments
JstKddng commented on 2022-05-06 14:37 (UTC) (edited on 2022-06-27 13:48 (UTC) by JstKddng)
A new va-api patch for wayland has been added. Required flags for it to work are the following, thanks to @acidunit
JstKddng commented on 2020-07-19 06:34 (UTC)
You can get prebuilt binaries here:
https://github.com/ungoogled-software/ungoogled-chromium-archlinux#binary-downloads
seppia commented on 2018-12-12 21:34 (UTC)
Please do NOT flag this package as out of date in relation to official chromium releases.
This is NOT Google Chromium and new releases come after additional work of the ungoogled-chromium contributors, so they may not be ready, nor available for days or even weeks after a new version of official chromium is released.
Please refer to https://github.com/Eloston/ungoogled-chromium/tags for ungoogled-chromium releases. Use those and please flag this package as out of date only if a newer release is present there. I will update the PKGBUILD as soon as I can every time a new release comes out.
Thanks