File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,14 @@ function(add_swift_compiler_modules_library name)
171
171
endforeach ()
172
172
173
173
# Create a static library containing all module object files.
174
- add_library (${name} STATIC force_lib.c ${all_obj_files} )
174
+ if (XCODE )
175
+ # Xcode does not compile libraries that contain only object files.
176
+ # Therefore, it fails to create the static library. As a workaround,
177
+ # 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} )
181
+ endif ()
175
182
add_dependencies (${name} ${all_module_targets} )
176
183
set_target_properties (${name} PROPERTIES LINKER_LANGUAGE CXX )
177
184
set_property (GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name} )
Original file line number Diff line number Diff line change 10
10
//
11
11
//===----------------------------------------------------------------------===//
12
12
13
- /// Dummy source file to force CMake generated SwiftInTheCompiler.xcodeproj to sucessfully build static
14
- /// libraries containing only object fies for "bootstrap" process building Swift sources into compiler.
13
+ /// Dummy source file to force CMake generated SwiftInTheCompiler.xcodeproj
14
+ /// to sucessfully build static libraries conatining only object files used
15
+ /// during "bootstrap" process to link Swift sources into the compiler.
You can’t perform that action at this time.
0 commit comments