Index: kernel/meson.build
===================================================================
--- kernel/meson.build	(revision 2483f28f2b2801066346c0599f06826c7c320e6e)
+++ kernel/meson.build	(revision 19c2b4456ed2d8dc6553f2dcf60adb98369f5702)
@@ -62,6 +62,10 @@
 ]
 
+if CONFIG_LTO
+	kernel_link_args += [ '-flto' ]
+endif
+
 if CONFIG_STRIP_BINARIES
-	# TODO: let meson do this
+	# TODO: do this after disassembling
 	kernel_link_args += [ '-s' ]
 endif
@@ -72,4 +76,8 @@
 	cc.get_supported_arguments([ '-Wno-cast-function-type' ]),
 ]
+
+if CONFIG_LTO
+	kernel_c_args += [ '-flto' ]
+endif
 
 if cc.get_id() == 'clang'
