Skip to content

Commit 6b93a47

Browse files
authored
Merge pull request #2431 from compnerd/executioner
Build: add new `executableExtension` property (NFC)
2 parents dbdd7d1 + bd7fedf commit 6b93a47

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/Build/Triple.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,17 @@ extension Triple {
182182
}
183183
}
184184

185+
public var executableExtension: String {
186+
switch os {
187+
case .darwin, .macOS:
188+
return ""
189+
case .linux:
190+
return ""
191+
case .windows:
192+
return ".exe"
193+
}
194+
}
195+
185196
/// The file extension for Foundation-style bundle.
186197
public var nsbundleExtension: String {
187198
switch os {

0 commit comments

Comments
 (0)