Skip to content

Commit 4098854

Browse files
committed
-lc++ on macOS, -lstdc++ on Linux
1 parent bfdb992 commit 4098854

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utils/make-pkgconfig.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import Foundation
33

44
#if os(Linux)
55
typealias Process = Task
6+
let libCPP = "-lstdc++"
7+
#elseif os(macOS)
8+
let libCPP = "-lc++"
69
#endif
710

811
/// Runs the specified program at the provided path.
@@ -93,7 +96,7 @@ func makeFile() throws {
9396
"Name: cllvm",
9497
"Description: The llvm library",
9598
"Version: \(version)",
96-
"Libs: \(ldFlags) -lstdc++",
99+
"Libs: \(ldFlags) \(libCPP)",
97100
"Requires.private:",
98101
"Cflags: \(cFlags)",
99102
].joined(separator: "\n")

0 commit comments

Comments
 (0)