Skip to content

Commit 14b3b38

Browse files
authored
Make SWIFT_STDLIB_ENABLE_LTO flag apply LTO to C/C++ compile flags too (#38959)
1 parent fb45c05 commit 14b3b38

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,9 +1150,7 @@ function(_add_swift_target_library_single target name)
11501150
set(analyze_code_coverage "${SWIFT_ANALYZE_CODE_COVERAGE}")
11511151
endif()
11521152

1153-
if (NOT SWIFTLIB_SINGLE_TARGET_LIBRARY)
1154-
set(lto_type "${SWIFT_STDLIB_ENABLE_LTO}")
1155-
endif()
1153+
set(lto_type "${SWIFT_STDLIB_ENABLE_LTO}")
11561154

11571155
_add_target_variant_c_compile_flags(
11581156
SDK "${SWIFTLIB_SINGLE_SDK}"

0 commit comments

Comments
 (0)