Skip to content

Commit b97795d

Browse files
authored
Merge pull request swiftlang#41158 from Azoy/fix-linux-warnings
[cmake] Fix availability macro warnings when bootstrapping
2 parents c133335 + 531202d commit b97795d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,11 @@ function(add_swift_target_library_single target name)
833833
-libc;${SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY})
834834
endif()
835835

836+
# Define availability macros.
837+
foreach(def ${SWIFT_STDLIB_AVAILABILITY_DEFINITIONS})
838+
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS "-Xfrontend" "-define-availability" "-Xfrontend" "${def}")
839+
endforeach()
840+
836841
# Don't install the Swift module content for back-deployment libraries.
837842
if (SWIFTLIB_SINGLE_BACK_DEPLOYMENT_LIBRARY)
838843
set(install_in_component "never_install")
@@ -1712,11 +1717,6 @@ function(add_swift_target_library name)
17121717
"Either SHARED, STATIC, or OBJECT_LIBRARY must be specified")
17131718
endif()
17141719

1715-
# Define availability macros.
1716-
foreach(def ${SWIFT_STDLIB_AVAILABILITY_DEFINITIONS})
1717-
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-Xfrontend" "-define-availability" "-Xfrontend" "${def}")
1718-
endforeach()
1719-
17201720
# In the standard library and overlays, warn about implicit overrides
17211721
# as a reminder to consider when inherited protocols need different
17221722
# behavior for their requirements.

0 commit comments

Comments
 (0)