Skip to content
Permalink
Browse files
Small refinements?
  • Loading branch information
johnno1962 committed May 19, 2022
1 parent 277699b commit 5381466580cb05ea80f7f7796463da27ea91df27
Showing 1 changed file with 2 additions and 12 deletions.
@@ -175,22 +175,12 @@ function(add_swift_compiler_modules_library name)
# Xcode does not compile libraries that contain only object files.
# Therefore, it fails to create the static library. As a workaround,
# we add an empty source file force_lib.c to the target.
add_library(${name} STATIC force_lib.c ${all_obj_files})
else()
add_library(${name} STATIC ${all_obj_files})
set(all_obj_files force_lib.c ${all_obj_files})
endif()
add_library(${name} STATIC ${all_obj_files})
add_dependencies(${name} ${all_module_targets})
set_target_properties(${name} PROPERTIES LINKER_LANGUAGE CXX)
set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name})

# Xcode does not compile libraries that contain only object files.
# Therefore, it fails to create the static library. As a workaround,
# we add a dummy script phase to the target.
if (XCODE)
add_custom_command(TARGET ${name} POST_BUILD
COMMAND ""
COMMENT "Dummy script phase to force building this target")
endif()
endfunction()


0 comments on commit 5381466

Please sign in to comment.