[Concept,10/18] ulib: Disable LTO when building the library

Message ID 20250909151824.2327219-11-sjg@u-boot.org
State New
Headers
Series ulib: Complete initial U-Boot library |

Commit Message

Simon Glass Sept. 9, 2025, 3:18 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

The library uses symbol renaming, but this is not supported with LTO.
Ensure that LTO is disabled if ULIB is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/Kconfig b/Kconfig
index c110c9f2a6e..6461443566e 100644
--- a/Kconfig
+++ b/Kconfig
@@ -128,7 +128,7 @@  config ARCH_SUPPORTS_LTO
 
 config LTO
 	bool "Enable Link Time Optimizations"
-	depends on ARCH_SUPPORTS_LTO
+	depends on ARCH_SUPPORTS_LTO && !ULIB
 	help
 	  This option enables Link Time Optimization (LTO), a mechanism which
 	  allows the compiler to optimize between different compilation units.