From fd187f952e3ddc2606915d7169119618f64bdc88 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 24 Oct 2021 17:06:43 -0700 Subject: [PATCH] kern: enable lto for global instants (saves about a page in deduplicated code) --- .../include/mesosphere/kern_k_auto_object_container.hpp | 3 ++- mesosphere/kernel/Makefile | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp index a6ddac400..05a3de505 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_auto_object_container.hpp @@ -108,7 +108,8 @@ namespace ams::kern { struct DummyKAutoObjectWithListComparator { static NOINLINE int Compare(KAutoObjectWithList &lhs, KAutoObjectWithList &rhs) { - AMS_ASSUME(false); + MESOSPHERE_UNUSED(lhs, rhs); + MESOSPHERE_PANIC("DummyKAutoObjectWithListComparator invoked"); } }; diff --git a/mesosphere/kernel/Makefile b/mesosphere/kernel/Makefile index b73a399b9..6972917fe 100644 --- a/mesosphere/kernel/Makefile +++ b/mesosphere/kernel/Makefile @@ -117,6 +117,7 @@ $(OFILES) : $(ATMOSPHERE_LIBRARIES_DIR)/libmesosphere/$(ATMOSPHERE_LIBRARY_DIR)/ $(OFILES_SRC) : $(HFILES_BIN) kern_libc_generic.o: CFLAGS += -fno-builtin +kern_kernel_instantiations.o: CXXFLAGS += -flto #--------------------------------------------------------------------------------- # you need a rule like this for each extension you use as binary data