File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -175,22 +175,12 @@ function(add_swift_compiler_modules_library name)
175175 # Xcode does not compile libraries that contain only object files.
176176 # Therefore, it fails to create the static library. As a workaround,
177177 # we add an empty source file force_lib.c to the target.
178- add_library (${name} STATIC force_lib.c ${all_obj_files} )
179- else ()
180- add_library (${name} STATIC ${all_obj_files} )
178+ set (all_obj_files force_lib.c ${all_obj_files} )
181179 endif ()
180+ add_library (${name} STATIC ${all_obj_files} )
182181 add_dependencies (${name} ${all_module_targets} )
183182 set_target_properties (${name} PROPERTIES LINKER_LANGUAGE CXX)
184183 set_property (GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name} )
185-
186- # Xcode does not compile libraries that contain only object files.
187- # Therefore, it fails to create the static library. As a workaround,
188- # we add a dummy script phase to the target.
189- if (XCODE)
190- add_custom_command (TARGET ${name} POST_BUILD
191- COMMAND ""
192- COMMENT "Dummy script phase to force building this target" )
193- endif ()
194184endfunction ()
195185
196186
You can’t perform that action at this time.
0 commit comments