Skip to content

Commit eb3c043

Browse files
Merge pull request #64252 from aschwaighofer/no_opaque_pointers_under_lto
Fix the minimal/lto configuration
2 parents 90c471c + 49332f8 commit eb3c043

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ function(_add_target_variant_c_compile_link_flags)
137137
_compute_lto_flag("${CFLAGS_ENABLE_LTO}" _lto_flag_out)
138138
if (_lto_flag_out)
139139
list(APPEND result "${_lto_flag_out}")
140+
# Disable opaque pointers in lto mode.
141+
list(APPEND result "-Xclang")
142+
list(APPEND result "-no-opaque-pointers")
140143
endif()
141144

142145
set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)

0 commit comments

Comments
 (0)