File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1881,10 +1881,13 @@ function(add_swift_target_library name)
18811881 endforeach ()
18821882
18831883 # Add PrivateFrameworks, rdar://28466433
1884+ set (swiftlib_c_compile_flags_all ${SWIFTLIB_C_COMPILE_FLAGS} )
18841885 if (sdk IN_LIST SWIFT_APPLE_PLATFORMS AND SWIFTLIB_IS_SDK_OVERLAY)
18851886 set (swiftlib_swift_compile_private_frameworks_flag "-Fsystem" "${SWIFT_SDK_${sdk} _ARCH_${arch} _PATH}/System/Library/PrivateFrameworks/" )
18861887 endif ()
18871888
1889+ list (APPEND swiftlib_c_compile_flags_all "-DSWIFT_TARGET_LIBRARY_NAME=${name} " )
1890+
18881891 # Add this library variant.
18891892 _add_swift_library_single(
18901893 ${VARIANT_NAME}
@@ -1902,7 +1905,7 @@ function(add_swift_target_library name)
19021905 FRAMEWORK_DEPENDS_WEAK ${SWIFTLIB_FRAMEWORK_DEPENDS_WEAK}
19031906 LLVM_COMPONENT_DEPENDS ${SWIFTLIB_LLVM_COMPONENT_DEPENDS}
19041907 FILE_DEPENDS ${SWIFTLIB_FILE_DEPENDS} ${swiftlib_module_dependency_targets}
1905- C_COMPILE_FLAGS ${SWIFTLIB_C_COMPILE_FLAGS }
1908+ C_COMPILE_FLAGS ${swiftlib_c_compile_flags_all }
19061909 SWIFT_COMPILE_FLAGS ${swiftlib_swift_compile_flags_all} ${swiftlib_swift_compile_flags_arch} ${swiftlib_swift_compile_private_frameworks_flag}
19071910 LINK_FLAGS ${swiftlib_link_flags_all}
19081911 PRIVATE_LINK_LIBRARIES ${swiftlib_private_link_libraries_targets}
You can’t perform that action at this time.
0 commit comments