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
65 changes: 28 additions & 37 deletions cef/loong.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/PKGBUILD b/PKGBUILD
index e2fabf0..45af2c9 100644
index 84f85ce..e695478 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -205,6 +205,36 @@ prepare() {
@@ -201,6 +201,36 @@ prepare() {
# CEF: Remove libxml_visibility patch (fails with system libxml2)
patch -Np1 -i ../cef-no-libxml-visibility-patch.patch

Expand Down Expand Up @@ -39,7 +39,7 @@ index e2fabf0..45af2c9 100644
# CEF: Override clang_exe to use system clang
echo 'clang_exe = "clang"' >>cef/tools/clang_util.py

@@ -223,6 +253,13 @@ prepare() {
@@ -224,6 +254,13 @@ prepare() {
rm -f third_party/gperf/cipd/bin/gperf
ln -s /usr/bin/gperf third_party/gperf/cipd/bin/

Expand All @@ -53,7 +53,7 @@ index e2fabf0..45af2c9 100644
if ((!_system_clang)); then
# Use prebuilt rust as system rust cannot be used due to the error:
# error: the option `Z` is only accepted on the nightly compiler
@@ -346,9 +383,22 @@ build() {
@@ -347,11 +384,22 @@ build() {
)
fi

Expand All @@ -68,42 +68,33 @@ index e2fabf0..45af2c9 100644
+
export GN_DEFINES="${_flags[*]}"
# Only build Release config
- export GN_OUT_CONFIGS="Release_GN_x64"
+ if [[ $CARCH == loong64 ]]; then
if [[ $CARCH == "aarch64" ]]; then
export GN_DEFINES+=' target_cpu="arm64"'
export GN_OUT_CONFIGS="Release_GN_arm64"
+ elif [[ $CARCH == loong64 ]]; then
+ export GN_OUT_CONFIGS="Release_GN_loong64"
+ else
+ export GN_OUT_CONFIGS="Release_GN_x64"
+ fi

# Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
CFLAGS+=' -Wno-builtin-macro-redefined'
@@ -379,14 +429,23 @@ build() {

python3 cef/tools/gclient_hook.py
sed -i '/__sanitizer_set_death_callback/d' v8/src/sandbox/testing.cc
- ninja -C out/Release_GN_x64 libcef chrome_sandbox
+
+ if [[ $CARCH == loong64 ]]; then
+ local _cef_build_dir='out/Release_GN_loong64'
+ local _cef_build_flag='--loong64-build'
+ else
+ local _cef_build_dir='out/Release_GN_x64'
+ local _cef_build_flag='--x64-build'
+ fi
+
+ ninja -C "$_cef_build_dir" libcef chrome_sandbox
else
export GN_OUT_CONFIGS="Release_GN_x64"
fi
@@ -394,6 +442,8 @@ build() {

if [[ $CARCH == "aarch64" ]]; then
ninja -C out/Release_GN_arm64 libcef chrome_sandbox
+ elif [[ $CARCH == loong64 ]]; then
+ ninja -C out/Release_GN_loong64 libcef chrome_sandbox
else
ninja -C out/Release_GN_x64 libcef chrome_sandbox
fi
@@ -401,6 +451,8 @@ build() {
# Build the CEF binary distribution
python3 cef/tools/make_distrib.py \
--distrib-subdir=distrib \
--output-dir=.. \
--ninja-build \
- --x64-build \
+ "$_cef_build_flag" \
--minimal \
--no-docs \
--no-archive
@@ -420,4 +479,20 @@ package() {
if [[ $CARCH == "aarch64" ]]; then
local _distrib_arch_flag="--arm64-build"
+ elif [[ $CARCH == loong64 ]]; then
+ local _distrib_arch_flag="--loong64-build"
else
local _distrib_arch_flag="--x64-build"
fi
@@ -443,4 +495,20 @@ package() {
install -Dm644 ../chromium-$_chromium_ver/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE-CHROMIUM"
}

Expand Down
Loading