Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 10 additions & 1 deletion webrtc-sys/libwebrtc/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,22 @@ cd build

git apply "$COMMAND_DIR/patches/force_gcc.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn

cd ../..
cd ..

cd third_party

git apply "$COMMAND_DIR/patches/david_disable_gun_source_macro.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn

cd ../..

mkdir -p "$ARTIFACTS_DIR/lib"

python3 "./src/build/linux/sysroot_scripts/install-sysroot.py" --arch="$arch"

if [ "$arch" = "arm64" ]; then
sudo sed -i 's/__GLIBC_USE_ISOC2X[[:space:]]*1/__GLIBC_USE_ISOC2X\t0/' /usr/aarch64-linux-gnu/include/features.h
fi

debug="false"
if [ "$profile" = "debug" ]; then
debug="true"
Expand Down
13 changes: 13 additions & 0 deletions webrtc-sys/libwebrtc/patches/david_disable_gun_source_macro.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dav1d/BUILD.gn b/dav1d/BUILD.gn
index 9348e15c3c..f34db7ff98 100644
--- a/dav1d/BUILD.gn
+++ b/dav1d/BUILD.gn
@@ -101,7 +101,7 @@ if (is_win) {
dav1d_copts += [ "-D_DARWIN_C_SOURCE" ]
}
if (is_linux || is_chromeos || is_android || current_os == "aix") {
- if (!is_clang) {
+ if (!is_clang && (current_cpu == "x86" || current_cpu == "x64")) {
dav1d_copts += [ "-D_GNU_SOURCE" ]
}
}
27 changes: 13 additions & 14 deletions webrtc-sys/libwebrtc/patches/force_gcc.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
diff --git a/config/c++/c++.gni b/config/c++/c++.gni
index c29d898fb..5ef014e51 100644
--- a/config/c++/c++.gni
+++ b/config/c++/c++.gni
@@ -62,7 +62,7 @@ declare_args() {
# case.
# We disable that on LibFuzzer builds because it breaks the libfuzzer
# runtime. See crbug.com/411020147.
- use_llvm_libatomic = !is_apple && !is_nacl && !use_libfuzzer
+ use_llvm_libatomic = !is_apple && !is_nacl && !use_libfuzzer && !is_linux
}
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
index fca6c9295..31b76f722 100644
--- a/config/compiler/BUILD.gn
+++ b/config/compiler/BUILD.gn
@@ -656,6 +656,7 @@ config("compiler") {
# standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
# to -std=c*.
standard_prefix = "gnu"
+ defines += [ "_DEFAULT_SOURCE" ]
}

if (use_implicit_libcxx_modules) {
cflags_c += [ "-std=${standard_prefix}11" ]
diff --git a/config/linux/BUILD.gn b/config/linux/BUILD.gn
index 131bb71d1..36c86c48e 100644
index 131bb71d1..a928badd0 100644
--- a/config/linux/BUILD.gn
+++ b/config/linux/BUILD.gn
@@ -15,6 +15,7 @@ group("linux") {
# is applied to all targets. It is here to separate out the logic that is
# Linux-only. This is not applied to Android, but is applied to ChromeOS.
config("compiler") {
+ cflags_cc = [ "-Wno-changes-meaning" ]
+ cflags_cc = [ "-Wno-changes-meaning", "-Wno-unknown-pragmas" ]
if (current_cpu == "arm64") {
import("//build/config/arm.gni")
cflags = []
Loading