Skip to content

Commit 81af079

Browse files
authored
Merge pull request swiftlang#30976 from compnerd/unused-paths
build: remove Swift search paths for host
2 parents f7a65f8 + 7e2ca19 commit 81af079

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,6 @@ function(_add_swift_host_library_single target)
548548
message(FATAL_ERROR "Either SHARED or STATIC must be specified")
549549
endif()
550550

551-
# Determine the subdirectory where this library will be installed.
552-
set(ASHLS_SUBDIR
553-
"${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}/${SWIFT_HOST_VARIANT_ARCH}")
554-
555551
# Include LLVM Bitcode slices for iOS, Watch OS, and Apple TV OS device libraries.
556552
set(embed_bitcode_arg)
557553
if(SWIFT_EMBED_BITCODE_SECTION)
@@ -656,19 +652,7 @@ function(_add_swift_host_library_single target)
656652
set(c_compile_flags ${ASHLS_C_COMPILE_FLAGS})
657653
set(link_flags)
658654

659-
set(library_search_subdir "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
660-
set(library_search_directories
661-
"${SWIFTLIB_DIR}/${ASHLS_SUBDIR}"
662-
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${ASHLS_SUBDIR}"
663-
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
664-
665-
# In certain cases when building, the environment variable SDKROOT is set to override
666-
# where the sdk root is located in the system. If that environment variable has been
667-
# set by the user, respect it and add the specified SDKROOT directory to the
668-
# library_search_directories so we are able to link against those libraries
669-
if(DEFINED ENV{SDKROOT} AND EXISTS "$ENV{SDKROOT}/usr/lib/swift")
670-
list(APPEND library_search_directories "$ENV{SDKROOT}/usr/lib/swift")
671-
endif()
655+
set(library_search_directories)
672656

673657
_add_variant_c_compile_flags(
674658
SDK "${SWIFT_HOST_VARIANT_SDK}"

0 commit comments

Comments
 (0)