From 5b1cc026d160a4fc19902dba1ccec871d7c74fc0 Mon Sep 17 00:00:00 2001 From: Lightos1 <124387232+Lightos1@users.noreply.github.com> Date: Tue, 6 Oct 2026 18:32:35 +0200 Subject: [PATCH] add lto --- Source/hoc-clk/sysmodule/Makefile | 4 ++-- Source/hoc-clk/sysmodule/src/board/board_volt.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/hoc-clk/sysmodule/Makefile b/Source/hoc-clk/sysmodule/Makefile index 03b7eb07..d9954b2b 100644 --- a/Source/hoc-clk/sysmodule/Makefile +++ b/Source/hoc-clk/sysmodule/Makefile @@ -39,7 +39,7 @@ DEFINES := -DDISABLE_IPC -DKIP_VERSION=$(KIP_VERSION) -DCUST_REV=$(CUST_REV) -DT ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE -CFLAGS := -g -Wall -Os \ +CFLAGS := -g -Wall -Os -flto=auto \ -ffast-math -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables -fno-unwind-tables \ $(ARCH) $(DEFINES) @@ -48,7 +48,7 @@ CFLAGS += $(INCLUDE) -D__SWITCH__ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++23 ASFLAGS := -g $(ARCH) -LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) -Wl,-wrap,__cxa_throw -Wl,-wrap,_Unwind_Resume -Wl,-wrap,__gxx_personality_v0 +LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Os -flto=auto -Wl,-Map,$(notdir $*.map) -Wl,-wrap,__cxa_throw -Wl,-wrap,_Unwind_Resume -Wl,-wrap,__gxx_personality_v0 LIBS := $(foreach lib,$(LIBNAMES),-l$(lib)) -lnx diff --git a/Source/hoc-clk/sysmodule/src/board/board_volt.cpp b/Source/hoc-clk/sysmodule/src/board/board_volt.cpp index 91dcb959..ffbff8f9 100644 --- a/Source/hoc-clk/sysmodule/src/board/board_volt.cpp +++ b/Source/hoc-clk/sysmodule/src/board/board_volt.cpp @@ -780,7 +780,6 @@ namespace board { return; } - u32 tmpLut[LutSize]; std::memcpy(tmpLut, cpuVoltData.table, sizeof(tmpLut));