From c559e6010463ec6ccc5362c5436437c0f7cf18a6 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 18 May 2022 18:18:55 +0200 Subject: [PATCH] Adds lto as link flag to mold --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbae81a..56fa36c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ endif (SHARED) if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if (EXISTS /usr/bin/mold) message(STATUS "Mold found, using as linker") - add_link_options(-fuse-ld=mold) + add_link_options(-fuse-ld=mold -flto) else () add_link_options(-fuse-ld=lld) endif ()