diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake index 289716edfd496..078ada591e962 100644 --- a/cmake/modules/AddSwift.cmake +++ b/cmake/modules/AddSwift.cmake @@ -58,6 +58,8 @@ function(_compute_lto_flag option out_var) set(${out_var} "-flto=full" PARENT_SCOPE) elseif (lowercase_option STREQUAL "thin") set(${out_var} "-flto=thin" PARENT_SCOPE) + else() + set(${out_var} "-fno-lto" PARENT_SCOPE) endif() endfunction()