Skip to content

Commit dd7096c

Browse files
committed
fix RPATH
1 parent 1913d97 commit dd7096c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Sources/Testing/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ else()
112112
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-plugin-path ${BINARY_DIR}>")
113113
endif()
114114

115-
# TODO: @rpath-relative install name
116-
# This may or may not involve the `-(no-)toolchain-stdlib-rpath` Swift flag.
115+
target_compile_options(Testing PRIVATE "-no-toolchain-stdlib-rpath")
116+
# TODO: Finalize
117+
set_property(TARGET Testing PROPERTY INSTALL_RPATH "$ORIGIN")
117118

118119
include(SwiftModuleInstallation)
119120
# TODO: Finalize the install path

Sources/TestingMacros/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ if(SwiftTesting_BuildMacrosAsExecutables)
5959
else()
6060
add_library(TestingMacros SHARED)
6161

62+
target_link_options(TestingMacros PRIVATE "-no-toolchain-stdlib-rpath")
63+
# Not setting RPATH requires all the dependencies are already loaded in the
64+
# process, because 'plugin' directory wouldn't contain any dependencies.
65+
set_property(TARGET TestingMacros PROPERTY INSTALL_RPATH)
66+
6267
# Install the macro plugin to the default location.
6368
#
6469
# This is not the plugin's actual, final install location -- it's only

0 commit comments

Comments
 (0)