Skip to content

Commit 1ce0599

Browse files
committed
Add -v to cc when swift-build is instantiated -vv
1 parent bd97ae1 commit 1ce0599

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

Sources/Build/describe().swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public func describe(prefix: String, _ conf: Configuration, _ modules: [Module],
4141
}
4242

4343
var mkdirs = Set<String>()
44-
let swiftcArgs = Xcc + Xswiftc
44+
let swiftcArgs = Xcc + Xswiftc + verbosity.ccArgs
4545

4646
for case let module as SwiftModule in modules {
4747

Sources/ManifestParser/Manifest+parse.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ private func parse(manifestPath: String) throws -> String? {
6464
cmd += ["--driver-mode=swift"]
6565
cmd += ["-I", libdir]
6666
cmd += ["-L", libdir, "-lPackageDescription"]
67+
cmd += verbosity.ccArgs
6768
#if os(OSX)
6869
cmd += ["-target", "x86_64-apple-macosx10.10"]
6970
#endif

Sources/Utility/Verbosity.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ public enum Verbosity: Int {
2323
self = .Debug
2424
}
2525
}
26+
27+
public var ccArgs: [String] {
28+
switch self {
29+
case .Concise:
30+
return []
31+
case .Verbose:
32+
// the first level of verbosity is passed to llbuild itself
33+
return []
34+
case .Debug:
35+
return ["-v"]
36+
}
37+
}
2638
}
2739

2840
public var verbosity = Verbosity.Concise

0 commit comments

Comments
 (0)