Skip to content

Commit e703f93

Browse files
committed
Remove extra installed copy of libFoundation.so
- Currently libFoundation.so exists in 2 places in the distribution tarfile: ./usr/lib/swift/linux/x86_64/libFoundation.so ./usr/lib/swift/linux/libFoundation.so - ld.so will load the first one located in x86_64 subdirectory which will then set $ORIGIN to this directory. Consequently, the libICU shared libraries required by libFoundation.so will not be found. - Update CMakeLists.txt to not install libFoundation.so in the x86_64 directory. - Also remove an unneeded RUNPATH pointing to the build directory for libdispatch. This is already reached using LD_LIBRARY_PATH during testing.
1 parent 9cc86f6 commit e703f93

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ if(FOUNDATION_ENABLE_LIBDISPATCH)
5959
set(deployment_enable_libdispatch -DDEPLOYMENT_ENABLE_LIBDISPATCH)
6060
set(libdispatch_cflags -I;${FOUNDATION_PATH_TO_LIBDISPATCH_SOURCE};-I;${FOUNDATION_PATH_TO_LIBDISPATCH_BUILD}/src/swift;-Xcc;-fblocks)
6161
set(libdispatch_ldflags -L;${FOUNDATION_PATH_TO_LIBDISPATCH_BUILD};-L;${FOUNDATION_PATH_TO_LIBDISPATCH_BUILD}/src;-ldispatch)
62-
if(CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL Android OR CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
63-
list(APPEND libdispatch_ldflags -Xlinker;-rpath;-Xlinker;${FOUNDATION_PATH_TO_LIBDISPATCH_BUILD}/src)
64-
endif()
6562
endif()
6663

6764
add_swift_library(Foundation
@@ -465,12 +462,6 @@ install(FILES
465462
CoreFoundation/Base.subproj/module.map
466463
DESTINATION
467464
lib/swift/CoreFoundation)
468-
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
469-
install(FILES
470-
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}Foundation${CMAKE_SHARED_LIBRARY_SUFFIX}
471-
DESTINATION
472-
lib/swift/${swift_os}/${swift_arch})
473-
endif()
474465
install(FILES
475466
${CMAKE_CURRENT_BINARY_DIR}/plutil
476467
DESTINATION

0 commit comments

Comments
 (0)