mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Driver] Don't hardcode default linker on Linux
This is the C++ driver counterpart to a change that landed in the Swift driver a while ago to use the clang-linker to determine what the default linker is. This is to avoid hard-coding gold, which is deprecated and not available on some newer Linux distributions. The challenge is that these newer Linux distributions don't already have Swift so we have to use the old C++ driver implementation.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// RUN: %swiftc_driver_plain -target aarch64-unknown-none-none -driver-print-jobs %s 2>&1 | %FileCheck %s
|
||||
|
||||
// CHECK: {{.*}}swift{{c|c-legacy-driver|-frontend}}{{(.exe)?"?}} -frontend -c
|
||||
// CHECK: {{.*}}clang{{(.exe)?"?}} -fuse-ld=gold
|
||||
// CHECK: {{.*}}clang{{(.exe)?"?}}
|
||||
|
||||
@@ -344,7 +344,6 @@
|
||||
|
||||
// LINUX_DYNLIB-x86_64: clang{{(\.exe)?"? }}
|
||||
// LINUX_DYNLIB-x86_64-DAG: -shared
|
||||
// LINUX_DYNLIB-x86_64-DAG: -fuse-ld=gold
|
||||
// LINUX_DYNLIB-x86_64-NOT: -pie
|
||||
// LINUX_DYNLIB-x86_64-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)linux]]
|
||||
// LINUX_DYNLIB-x86_64: [[STDLIB_PATH]]{{/|\\\\}}x86_64{{/|\\\\}}swiftrt.o
|
||||
|
||||
Reference in New Issue
Block a user