|
1 | | ---- a/build/toolchain/toolchain.gni |
2 | | -+++ b/build/toolchain/toolchain.gni |
3 | | -@@ -51,6 +51,10 @@ |
4 | | - } |
5 | | - } |
6 | | - |
| 1 | +--- /dev/null 2026-04-08 02:08:03.222890460 +0200 |
| 2 | ++++ b/build/config/linux/musl.gni 2026-04-10 01:18:23.479529250 +0200 |
| 3 | +@@ -0,0 +1,3 @@ |
7 | 4 | +declare_args() { |
8 | 5 | + is_musl = false |
9 | 6 | +} |
10 | | -+ |
11 | | - # Extension for shared library files (including leading dot). |
12 | | - if (is_apple) { |
13 | | - shlib_extension = ".dylib" |
14 | 7 | --- a/build/config/compiler/BUILD.gn |
15 | 8 | +++ b/build/config/compiler/BUILD.gn |
| 9 | +@@ -20,6 +20,7 @@ |
| 10 | + import("//build/config/rust.gni") |
| 11 | + import("//build/config/ui.gni") |
| 12 | + import("//build/config/unwind.gni") |
| 13 | ++import("//build/config/linux/musl.gni") |
| 14 | + import("//build/toolchain/rbe.gni") |
| 15 | + import("//build/toolchain/toolchain.gni") |
| 16 | + import("//build_overrides/build.gni") |
16 | 17 | @@ -1282,8 +1282,13 @@ |
17 | 18 | # simplicity we always explicitly set the architecture. |
18 | 19 | if (current_cpu == "x64") { |
|
61 | 62 | } |
62 | 63 | } else if (current_cpu == "mipsel") { |
63 | 64 | ldflags += [ "-Wl,--hash-style=sysv" ] |
| 65 | +--- a/buildtools/third_party/libc++/__config_site |
| 66 | ++++ b/buildtools/third_party/libc++/__config_site |
| 67 | +@@ -26,12 +26,6 @@ |
| 68 | + #define _LIBCPP_HAS_MONOTONIC_CLOCK 1 |
| 69 | + #define _LIBCPP_HAS_TERMINAL 1 |
| 70 | + |
| 71 | +-#ifdef ANDROID_HOST_MUSL |
| 72 | +-#define _LIBCPP_HAS_MUSL_LIBC 1 |
| 73 | +-#else |
| 74 | +-#define _LIBCPP_HAS_MUSL_LIBC 0 |
| 75 | +-#endif |
| 76 | +- |
| 77 | + #ifdef _WIN32 |
| 78 | + #define _LIBCPP_HAS_THREAD_API_PTHREAD 0 |
| 79 | + #define _LIBCPP_HAS_THREAD_API_EXTERNAL 0 |
| 80 | +--- a/build/config/rust.gni |
| 81 | ++++ b/build/config/rust.gni |
| 82 | +@@ -5,6 +5,7 @@ |
| 83 | + import("//build/config/chrome_build.gni") |
| 84 | + import("//build/config/compiler/compiler.gni") |
| 85 | + import("//build/config/sanitizers/sanitizers.gni") |
| 86 | ++import("//build/config/linux/musl.gni") |
| 87 | + import("//build/toolchain/toolchain.gni") |
| 88 | + |
| 89 | + if (is_android) { |
| 90 | +--- a/build/config/c++/BUILD.gn |
| 91 | ++++ b/build/config/c++/BUILD.gn |
| 92 | +@@ -3,6 +3,7 @@ |
| 93 | + import("//build/config/chromeos/ui_mode.gni") |
| 94 | + import("//build/config/compiler/compiler.gni") |
| 95 | + import("//build/config/dcheck_always_on.gni") |
| 96 | ++import("//build/config/linux/musl.gni") |
| 97 | + import("//buildtools/deps_revisions.gni") |
| 98 | + |
| 99 | + assert(use_custom_libcxx, "should only be used if use_custom_libcxx is set") |
| 100 | +@@ -60,6 +61,12 @@ |
| 101 | + |
| 102 | + defines += [ "CR_LIBCXX_REVISION=$libcxx_revision" ] |
| 103 | + |
| 104 | ++ if (is_musl) { |
| 105 | ++ defines += [ "_LIBCPP_HAS_MUSL_LIBC=1" ] |
| 106 | ++ } else { |
| 107 | ++ defines += [ "_LIBCPP_HAS_MUSL_LIBC=0" ] |
| 108 | ++ } |
| 109 | ++ |
| 110 | + if (is_win) { |
| 111 | + # Intentionally not using libc++abi on Windows because libc++abi only |
| 112 | + # implements the Itanium C++ ABI, and not the Microsoft ABI which we use on |
0 commit comments