@@ -74,11 +74,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
74
74
add_swift_library (section_magic_begin IS_STDLIB IS_STDLIB_CORE
75
75
swift_sections.S
76
76
C_COMPILE_FLAGS ${swift_runtime_compile_flags} "-DSWIFT_BEGIN"
77
- INSTALL_IN_COMPONENT stdlib )
77
+ INSTALL_IN_COMPONENT never_install )
78
78
add_swift_library (section_magic_end IS_STDLIB IS_STDLIB_CORE
79
79
swift_sections.S
80
80
C_COMPILE_FLAGS ${swift_runtime_compile_flags} "-DSWIFT_END"
81
- INSTALL_IN_COMPONENT stdlib )
81
+ INSTALL_IN_COMPONENT never_install )
82
82
endif ()
83
83
84
84
set (object_target_list )
@@ -89,17 +89,23 @@ foreach(sdk ${SWIFT_CONFIGURED_SDKS})
89
89
90
90
set (section_magic_begin_name "section_magic_begin-${SWIFT_SDK_${sdk} _LIB_SUBDIR}-${arch} " )
91
91
set (section_magic_end_name "section_magic_end-${SWIFT_SDK_${sdk} _LIB_SUBDIR}-${arch} " )
92
- add_custom_command_target (${section_magic_begin_name} _begin
93
- OUTPUT "${SWIFTLIB_DIR} /${arch_subdir} /swift_begin.o"
94
- COMMAND "${CMAKE_COMMAND} " -E copy "${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${section_magic_begin_name} .dir/swift_sections.S${CMAKE_C_OUTPUT_EXTENSION} " "${SWIFTLIB_DIR} /${arch_subdir} /swift_begin.o"
95
- DEPENDS ${section_magic_begin_name} )
92
+ add_custom_command_target (section_magic_o
93
+ COMMAND
94
+ "${CMAKE_COMMAND} " -E copy
95
+ "${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${section_magic_begin_name} .dir/swift_sections.S${CMAKE_C_OUTPUT_EXTENSION} "
96
+ "${SWIFTLIB_DIR} /${arch_subdir} /swift_begin.o"
97
+ COMMAND
98
+ "${CMAKE_COMMAND} " -E copy
99
+ "${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${section_magic_end_name} .dir/swift_sections.S${CMAKE_C_OUTPUT_EXTENSION} "
100
+ "${SWIFTLIB_DIR} /${arch_subdir} /swift_end.o"
101
+ OUTPUT
102
+ "${SWIFTLIB_DIR} /${arch_subdir} /swift_begin.o"
103
+ "${SWIFTLIB_DIR} /${arch_subdir} /swift_end.o"
104
+ DEPENDS
105
+ ${section_magic_begin_name}
106
+ ${section_magic_end_name} )
96
107
97
- add_custom_command_target (${section_magic_begin_name} _end
98
- OUTPUT "${SWIFTLIB_DIR} /${arch_subdir} /swift_end.o"
99
- COMMAND "${CMAKE_COMMAND} " -E copy "${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/${section_magic_end_name} .dir/swift_sections.S${CMAKE_C_OUTPUT_EXTENSION} " "${SWIFTLIB_DIR} /${arch_subdir} /swift_end.o"
100
- DEPENDS ${section_magic_end_name} )
101
-
102
- list (APPEND object_target_list "${SWIFTLIB_DIR} /${arch_subdir} /swift_begin.o" "${SWIFTLIB_DIR} /${arch_subdir} /swift_end.o" )
108
+ list (APPEND object_target_list "${section_magic_o} " )
103
109
104
110
swift_install_in_component (stdlib
105
111
FILES "${SWIFTLIB_DIR} /${arch_subdir} /swift_begin.o" "${SWIFTLIB_DIR} /${arch_subdir} /swift_end.o"
0 commit comments