Skip to content

DNM: On ELF platforms, look for the runtime libraries in an architecture-specific directory. #6179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Sources/Commands/Utilities/TestingSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ enum TestingSupport {
env.prependPath("Path", value: location.pathString)
}
#elseif os(Linux)
var libraryPaths = ["/usr/lib/swift/linux"]
let arch = buildParameters.triple.arch.rawValue
var libraryPaths = ["/usr/lib/swift/linux/\(arch)"]
if let path = env["PATH"], let firstPathEntry = path.components(separatedBy: ":").first {
libraryPaths.append("\(firstPathEntry)/../lib/swift/linux")
libraryPaths.append("\(firstPathEntry)/../lib/swift/linux/\(arch)")
}
if let originalLibraryPaths = env["LD_LIBRARY_PATH"] {
libraryPaths.append(originalLibraryPaths)
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageModelTests/DestinationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private let extraFlags = BuildFlags(
cCompilerFlags: ["-fintegrated-as"],
cxxCompilerFlags: ["-fno-exceptions"],
swiftCompilerFlags: ["-enable-experimental-cxx-interop", "-use-ld=lld"],
linkerFlags: ["-R/usr/lib/swift/linux/"]
linkerFlags: ["-R/usr/lib/swift/linux/x86_64"]
)

private let destinationV1JSON =
Expand Down
2 changes: 1 addition & 1 deletion Utilities/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ def get_swiftpm_flags(args):

platform_path = None
for path in args.target_info["paths"]["runtimeLibraryPaths"]:
platform_path = re.search(r"(lib/swift/([^/]+))$", path)
platform_path = re.search(r"(lib/swift/([\w/]+))$", path)
if platform_path:
build_flags.extend(
[
Expand Down