Skip to content

Commit c7d553a

Browse files
committed
Fix compilation on Linux
1 parent ed947c5 commit c7d553a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/swift-build/main.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,9 @@ do {
7575
// it is a common error on Linux for clang++ to not be installed, but
7676
// we need it for linking. swiftc itself gives a non-useful error, so
7777
// we try to help here.
78+
//FIXME using which is non-ideal: it may not be available
7879

79-
//TODO really we should figure out if clang++ is installed in a better way
80-
// however, since this is an error path, the performance implications are
81-
// less severe, so it will do for now.
82-
83-
if (try? popen(["clang++", "--version"], redirectStandardError: true)) == nil {
80+
if (try? sys.popen(["which", "clang++"])) == nil {
8481
print("warning: clang++ not found: this will cause build failure", toStream: &stderr)
8582
}
8683
#endif

0 commit comments

Comments
 (0)