Skip to content

Commit f07a84a

Browse files
authored
Merge pull request #23136 from benlangmuir/prize-lsp
[preset] Add sourcekit-lsp to swiftpm PR presets
2 parents 7d4b72f + a678e74 commit f07a84a

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

cmake/modules/SwiftSource.cmake

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function(_compile_swift_files
262262
if (SWIFTFILE_IS_STDLIB)
263263
list(APPEND swift_flags "-swift-version" "5")
264264
endif()
265-
265+
266266
# Force swift 4 compatibility mode for overlays.
267267
if (SWIFTFILE_IS_SDK_OVERLAY)
268268
list(APPEND swift_flags "-swift-version" "4")
@@ -344,16 +344,11 @@ function(_compile_swift_files
344344
list(APPEND module_outputs "${interface_file}")
345345
endif()
346346

347-
set(optional_arg)
348-
if(sdk IN_LIST SWIFT_APPLE_PLATFORMS)
349-
# Allow installation of stdlib without building all variants on Darwin.
350-
set(optional_arg "OPTIONAL")
351-
endif()
352-
353347
if(SWIFTFILE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
354348
swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT}"
355349
DIRECTORY "${specific_module_dir}"
356-
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}")
350+
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"
351+
OPTIONAL)
357352
else()
358353
swift_install_in_component("${SWIFTFILE_INSTALL_IN_COMPONENT}"
359354
FILES ${module_outputs}
@@ -439,7 +434,7 @@ function(_compile_swift_files
439434
set(file_path "${CMAKE_CURRENT_BINARY_DIR}/${file_name}.txt")
440435
string(REPLACE ";" "'\n'" source_files_quoted "${source_files}")
441436
file(WRITE "${file_path}" "'${source_files_quoted}'")
442-
437+
443438
# If this platform/architecture combo supports backward deployment to old
444439
# Objective-C runtimes, we need to copy a YAML file with legacy type layout
445440
# information to the build directory so that the compiler can find it.

utils/build-presets.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,12 @@ assertions
13801380
llbuild
13811381
swiftpm
13821382

1383+
sourcekit-lsp
1384+
1385+
install-swift
1386+
install-llbuild
1387+
install-swiftpm
1388+
13831389
dash-dash
13841390

13851391
skip-test-swift
@@ -1405,6 +1411,14 @@ xctest
14051411
foundation
14061412
libdispatch
14071413
llbuild
1414+
sourcekit-lsp
1415+
1416+
install-swift
1417+
install-llbuild
1418+
install-swiftpm
1419+
install-foundation
1420+
install-libdispatch
1421+
install-xctest
14081422

14091423
skip-test-swift
14101424
skip-test-cmark

0 commit comments

Comments
 (0)