Skip to content

Commit 2e610ad

Browse files
authored
[CMake] Don't add an extraneous rpath to the swift-frontend (#66121)
Cherrypick of #64103 Explanation: The current 5.9 snapshot has an incorrect relative runpath added to the compiler on linux, the second one: ``` > readelf -d swift-5.9-DEVELOPMENT-SNAPSHOT-2023-05-22-a-ubuntu20.04/usr/bin/swift-frontend | ag runpath 0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/../lib/swift/linux:$ORIGIN/../../lib/swift/linux] This pull fixes that, removing a mild security risk when running the compiler. ``` Scope: Only affects the compiler runpath on linux Issue: None Risk: low, as it only removes an unused runpath for the linux compiler Testing: Passed all CI on trunk Reviewer: @edymtt
1 parent 1231953 commit 2e610ad

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tools/driver/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ target_link_libraries(swift-frontend
7373

7474
add_swift_parser_link_libraries(swift-frontend)
7575

76-
_add_swift_runtime_link_flags(swift-frontend "../../lib" "")
77-
7876
# Create a `swift-driver` executable adjacent to the `swift-frontend` executable
7977
# to ensure that `swiftc` forwards to the standalone driver when invoked.
8078
swift_create_early_driver_copies(swift-frontend)

0 commit comments

Comments
 (0)