Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cr133][iOS][WIP] Enable use_partition_alloc.
The build fails with ERROR Unresolved dependencies. //third_party/dawn/src/dawn/partition_alloc:partition_alloc(//build/toolchain/ios:ios_clang_x64) needs //base/allocator/partition_allocator:partition_alloc(//build/toolchain/ios:ios_clang_x64) This is due to the upstream change below which doesn't expose //base/allocator/partition_allocator target when use_partition_alloc flag is false. However, //third_party/dawn/src/dawn/partition_alloc is only predicated on defined(dawn_partition_alloc_dir) - which is defined - and not on use_partition_alloc. I am not sure what's causing //third_party/dawn/src/dawn/partition_alloc to be referenced in the build in the first place. Enabling the var for now. If it causes crashes like it used, then we'll need to track down what's depending on dawn. https://source.chromium.org/chromium/chromium/src/+/4dacf2b61c359950d2c2f1b5f9b9d079a01290a4 commit 4dacf2b61c359950d2c2f1b5f9b9d079a01290a4 Author: Etienne Dechamps <[email protected]> Date: Thu Dec 19 08:31:05 2024 -0800 Don't build partition_alloc if it is not needed Currently //base has a dependency on partition_alloc code even if `use_partition_alloc` is false, with the rationale that this avoids `gn check` errors, relying on the linker to remove the dead code. The main problem with this approach is that even though the code does not make it into the final binary (hopefully... assuming no accidental code dependencies), we still attempt to build it. This is wasted work, but more importantly it can cause build failures because partition_alloc may contain code that does not build on all platforms where use_partition_alloc is false. One example is when building Cronet in AOSP - in this case this code is built against an older version of glibc that does not support memfd_create(), leading to a compilation error. We could attempt to work around such problems by making partition_alloc build on such platforms, but it seems silly to spend time implementing workarounds in what is literally dead code. Instead, it makes more sense to just not build partition_alloc when `use_partition_alloc` is false. This is what this commit does. Bug: b:381421702
- Loading branch information