diff --git a/scripts/prepare_dev.py b/scripts/prepare_dev.py index 8c0d391a6..19d35120d 100644 --- a/scripts/prepare_dev.py +++ b/scripts/prepare_dev.py @@ -40,7 +40,9 @@ ('0006-Fix-FFMPEG-config-for-MSVC-build.patch', FFMPEG_PATH), ('0007-Getting-install-build-deps-to-work-on-Ubuntu-22.04-L.patch', BUILD_PATH), ('0008-Allow-ffmpeg_branding-OWT.patch', FFMPEG_PATH), - ('0009-Add-an-GN-variable-for-using-BoringSSL.patch', LIBSRTP_PATH) + ('0009-Add-an-GN-variable-for-using-BoringSSL.patch', LIBSRTP_PATH), + ('0010-Roll-clang-llvmorg-18-init-12938-geb1d5065.patch', TOOL_PATH), + ('0011-Suppress-some-warnings-for-clang-18.patch', BUILD_PATH), ] def _patch(ignoreFailures=False): diff --git a/talk/owt/patches/0010-Roll-clang-llvmorg-18-init-12938-geb1d5065.patch b/talk/owt/patches/0010-Roll-clang-llvmorg-18-init-12938-geb1d5065.patch new file mode 100644 index 000000000..8ea95da0e --- /dev/null +++ b/talk/owt/patches/0010-Roll-clang-llvmorg-18-init-12938-geb1d5065.patch @@ -0,0 +1,30 @@ +From bcf270ff675649edabbf2389d62ae0ea22886e3b Mon Sep 17 00:00:00 2001 +From: Jianjun Zhu +Date: Thu, 7 Dec 2023 09:58:10 +0800 +Subject: [PATCH] Roll clang llvmorg-18-init-12938-geb1d5065. + +--- + clang/scripts/update.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/clang/scripts/update.py b/clang/scripts/update.py +index 2e56c78afd..5d37c5e7a4 100755 +--- a/clang/scripts/update.py ++++ b/clang/scripts/update.py +@@ -35,11 +35,11 @@ import zlib + # https://chromium.googlesource.com/chromium/src/+/main/docs/updating_clang.md + # Reverting problematic clang rolls is safe, though. + # This is the output of `git describe` and is usable as a commit-ish. +-CLANG_REVISION = 'llvmorg-16-init-6578-g0d30e92f' ++CLANG_REVISION = 'llvmorg-18-init-12938-geb1d5065' + CLANG_SUB_REVISION = 1 + + PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION) +-RELEASE_VERSION = '16.0.0' ++RELEASE_VERSION = '18' + + CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE', + 'https://commondatastorage.googleapis.com/chromium-browser-clang') +-- +2.43.0 + diff --git a/talk/owt/patches/0011-Suppress-some-warnings-for-clang-18.patch b/talk/owt/patches/0011-Suppress-some-warnings-for-clang-18.patch new file mode 100644 index 000000000..d4af06b0b --- /dev/null +++ b/talk/owt/patches/0011-Suppress-some-warnings-for-clang-18.patch @@ -0,0 +1,49 @@ +From 418bcfe0e92e30ab8f2e5528363f7d456ef8c67b Mon Sep 17 00:00:00 2001 +From: Jianjun Zhu +Date: Thu, 7 Dec 2023 10:18:43 +0800 +Subject: [PATCH] Suppress some warnings for clang 18. + +--- + config/compiler/BUILD.gn | 12 ++++++++++++ + toolchain/toolchain.gni | 2 +- + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn +index 75e3de46f..e0f215acf 100644 +--- a/config/compiler/BUILD.gn ++++ b/config/compiler/BUILD.gn +@@ -1576,6 +1576,18 @@ config("default_warnings") { + + # TODO(crbug.com/1352183) Evaluate and possibly enable. + "-Wno-bitfield-constant-conversion", ++ ++ # TODO(crbug.com/1412713) Evaluate and possibly enable. ++ "-Wno-deprecated-this-capture", ++ ++ # TODO(https://crbug.com/1491833): Fix and re-enable. ++ "-Wno-invalid-offsetof", ++ ++ # TODO(crbug.com/1494809): Evaluate and possibly enable. ++ "-Wno-vla-extension", ++ ++ # TODO(https://crbug.com/1490607): Fix and re-enable. ++ "-Wno-thread-safety-reference-return", + ] + } + } +diff --git a/toolchain/toolchain.gni b/toolchain/toolchain.gni +index 6a49c399e..3b8c7e2e4 100644 +--- a/toolchain/toolchain.gni ++++ b/toolchain/toolchain.gni +@@ -33,7 +33,7 @@ if (generate_linker_map) { + } + + declare_args() { +- clang_version = "16.0.0" ++ clang_version = "18" + } + + # Extension for shared library files (including leading dot). +-- +2.43.0 +