build_disable_thin_lto_mac.patch 1.2 KB

12345678910111213141516171819202122232425
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: VerteDinde <[email protected]>
  3. Date: Tue, 12 Nov 2024 21:16:15 -0800
  4. Subject: build: disable thin_lto on mac
  5. This patch disables thin lto on mac only. After Node 22 was merged into
  6. main, release builds began failing due to missing symbols, which seem to
  7. be being stripped out by thin lto.
  8. This patch can (and should) be removed when we can prevent those symbols
  9. from being stripped in the release build.
  10. diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
  11. index ac5ce5e5d80facc0bbafe51ced9aba53a8fb0c04..6c457c4e63c4024490b47aaf29dfbbab83bf6f5e 100644
  12. --- a/build/config/compiler/compiler.gni
  13. +++ b/build/config/compiler/compiler.gni
  14. @@ -86,7 +86,7 @@ declare_args() {
  15. # have the same LLVM revisions as us, making bitcode useless to them.
  16. use_thin_lto =
  17. is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 &&
  18. - (is_linux || is_win || is_mac ||
  19. + (is_linux || is_win ||
  20. (is_ios && use_lld && !is_cronet_build) ||
  21. (is_android && target_os != "chromeos") ||
  22. (is_chromeos && is_chromeos_device)))