|
1 | 1 | Description: Disable Clang >= 20 compiler options until packaged |
| 2 | +The -fextend-variable-liveness=none flag was added to Chromium to work with newer versions of Clang (likely Clang 20+) |
| 3 | +as -fextend-variable-liveness=none flag is not available in Clang<20 |
| 4 | +It is a new compiler flag: https://releases.llvm.org/20.1.0/tools/clang/docs/ReleaseNotes.html#new-compiler-flags |
| 5 | +This whole patch can be removed once we package Clang 20+ in the future. |
2 | 6 | Author: James Page <james.page@chainguard.dev> |
3 | 7 |
|
4 | 8 | --- a/build/config/compiler/BUILD.gn.orig 2025-05-12 16:11:29.949768459 +0100 |
5 | 9 | +++ b/build/config/compiler/BUILD.gn 2025-05-12 16:12:14.385296607 +0100 |
6 | | -@@ -312,7 +312,6 @@ config("compiler") { |
| 10 | +@@ -313,7 +313,6 @@ config("compiler") { |
7 | 11 | ":compiler_cpu_abi", |
8 | 12 | ":compiler_codegen", |
9 | 13 | ":compiler_deterministic", |
10 | 14 | - ":clang_warning_suppression", |
11 | 15 | ] |
12 | 16 |
|
13 | 17 | # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr |
| 18 | +@@ -623,13 +622,6 @@ config("compiler") { |
| 19 | + default_toolchain != "//build/toolchain/cros:target") { |
| 20 | + cflags += [ "-Wa,--crel,--allow-experimental-crel" ] |
| 21 | + } |
| 22 | +- |
| 23 | +- # TODO(crbug.com/413427035): Remove once |
| 24 | +- # https://github.com/llvm/llvm-project/pull/136867/ is landed. |
| 25 | +- if (!is_win && !llvm_android_mainline && |
| 26 | +- default_toolchain != "//build/toolchain/cros:target") { |
| 27 | +- cflags += [ "-fextend-variable-liveness=none" ] |
| 28 | +- } |
| 29 | + } |
| 30 | + |
| 31 | + # C11/C++11 compiler flags setup. |
0 commit comments