File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ function(_add_variant_c_compile_link_flags)
118
118
endif ()
119
119
endif ()
120
120
121
- if ( CFLAGS_ENABLE_LTO )
122
- _compute_lto_flag ( ${CFLAGS_ENABLE_LTO} _lto_flag_out )
121
+ _compute_lto_flag ( " ${ CFLAGS_ENABLE_LTO} " _lto_flag_out )
122
+ if ( _lto_flag_out )
123
123
list (APPEND result "${_lto_flag_out} " )
124
124
endif ()
125
125
Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ function(add_swift_unittest test_dirname)
15
15
#
16
16
# *NOTE* The unittests are never built for the target, so we always enable LTO
17
17
# *if we are asked to.
18
- if (SWIFT_TOOLS_ENABLE_LTO )
19
- set_property (TARGET "${test_dirname} " APPEND_STRING PROPERTY COMPILE_FLAGS " -flto " )
20
- set_property (TARGET "${test_dirname} " APPEND_STRING PROPERTY LINK_FLAGS " -flto " )
18
+ _compute_lto_flag ("${SWIFT_TOOLS_ENABLE_LTO} " _lto_flag_out )
19
+ if (_lto_flag_out )
20
+ set_property (TARGET "${test_dirname} " APPEND_STRING PROPERTY COMPILE_FLAGS " ${_lto_flag_out} " )
21
+ set_property (TARGET "${test_dirname} " APPEND_STRING PROPERTY LINK_FLAGS " ${_lto_flag_out} " )
21
22
endif ()
22
23
23
24
if (SWIFT_BUILT_STANDALONE AND NOT "${CMAKE_CFG_INTDIR} " STREQUAL "." )
You can’t perform that action at this time.
0 commit comments