mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[xcodegen] Allow buildable folders in more cases
We can define exceptions to handle targets with sources that either have unique arguments or are unbuildable. Eventually this ought to allow us to ditch the "no outside-target source file" rule, but I'm leaving that be for now since ideally we'd handle automatically splitting up umbrella Clang targets such as `stdlib` such that e.g `swiftCore` is its own buildable folder instead of an exception.
This commit is contained in:
@@ -129,12 +129,19 @@ extension PathProtocol {
|
||||
return false
|
||||
}
|
||||
|
||||
var isCSourceLike: Bool {
|
||||
var isClangSource: Bool {
|
||||
hasExtension(.c, .cpp, .m, .mm)
|
||||
}
|
||||
|
||||
var isSourceLike: Bool {
|
||||
isCSourceLike || hasExtension(.swift)
|
||||
isClangSource || hasExtension(.swift)
|
||||
}
|
||||
|
||||
/// Checks whether this file a source file that should be excluded from
|
||||
/// any generated targets.
|
||||
var isExcludedSource: Bool {
|
||||
// We don't get useful build arguments for these.
|
||||
hasExtension(.asm, .s, .cc, .cl, .inc, .proto)
|
||||
}
|
||||
|
||||
var isDocLike: Bool {
|
||||
|
||||
Reference in New Issue
Block a user