Skip to content

Commit 5381466

Browse files
committed
Small refinements?
1 parent 277699b commit 5381466

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff 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()
194184
endfunction()
195185

196186

0 commit comments

Comments
 (0)