Skip to content

Commit 32ca2fc

Browse files
Merge pull request #38206 from apple/QuietMisdreavus/libswift-option
always build the dummy libswift with Xcode
2 parents ad519b9 + 9ffaf8c commit 32ca2fc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ set(SWIFT_TOOLS_ENABLE_LTO OFF CACHE STRING "Build Swift tools with LTO. One
191191
option only affects the tools that run on the host (the compiler), and has
192192
no effect on the target libraries (the standard library and the runtime).")
193193

194-
option(SWIFT_TOOLS_ENABLE_LIBSWIFT
195-
"Enable building libswift and linking libswift into the compiler itself."
196-
FALSE)
194+
# NOTE: We do not currently support building libswift with the Xcode generator.
195+
cmake_dependent_option(SWIFT_TOOLS_ENABLE_LIBSWIFT
196+
"Enable building libswift and linking libswift into the compiler itself." FALSE
197+
"NOT CMAKE_GENERATOR STREQUAL \"Xcode\"" FALSE)
197198

198199
# The following only works with the Ninja generator in CMake >= 3.0.
199200
set(SWIFT_PARALLEL_LINK_JOBS "" CACHE STRING
@@ -1060,9 +1061,7 @@ if(SWIFT_INCLUDE_TOOLS)
10601061
# which is used in add_swift_host_tool for the lldb workaround.
10611062
#
10621063
# NOTE: We do not currently support libswift with the Xcode generator.
1063-
if (NOT CMAKE_GENERATOR STREQUAL "Xcode")
1064-
add_subdirectory(libswift)
1065-
endif()
1064+
add_subdirectory(libswift)
10661065

10671066
# Always include this after including stdlib/!
10681067
# Refer to the large comment above the add_subdirectory(stdlib) call.

0 commit comments

Comments
 (0)