Skip to content

Commit 531202d

Browse files
committed
Fix warnings for availability macros
1 parent c036b5b commit 531202d

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
@@ -829,6 +829,11 @@ function(add_swift_target_library_single target name)
829829
-libc;${SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY})
830830
endif()
831831

832+
# Define availability macros.
833+
foreach(def ${SWIFT_STDLIB_AVAILABILITY_DEFINITIONS})
834+
list(APPEND SWIFTLIB_SINGLE_SWIFT_COMPILE_FLAGS "-Xfrontend" "-define-availability" "-Xfrontend" "${def}")
835+
endforeach()
836+
832837
# Don't install the Swift module content for back-deployment libraries.
833838
if (SWIFTLIB_SINGLE_BACK_DEPLOYMENT_LIBRARY)
834839
set(install_in_component "never_install")
@@ -1708,11 +1713,6 @@ function(add_swift_target_library name)
17081713
"Either SHARED, STATIC, or OBJECT_LIBRARY must be specified")
17091714
endif()
17101715

1711-
# Define availability macros.
1712-
foreach(def ${SWIFT_STDLIB_AVAILABILITY_DEFINITIONS})
1713-
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-Xfrontend" "-define-availability" "-Xfrontend" "${def}")
1714-
endforeach()
1715-
17161716
# In the standard library and overlays, warn about implicit overrides
17171717
# as a reminder to consider when inherited protocols need different
17181718
# behavior for their requirements.

0 commit comments

Comments
 (0)