Commit 7bdf0600 authored by Drew's avatar Drew

Upgrade to Swift Preview 6

parent cb4bbc95
Pipeline #2464 failed with stage
in 38 seconds
...@@ -54,12 +54,12 @@ var focusOnTask : String? = nil ...@@ -54,12 +54,12 @@ var focusOnTask : String? = nil
var packageFile = defaultPackageFile var packageFile = defaultPackageFile
var toolchain = Platform.buildPlatform.defaultToolchainPath var toolchain = Platform.buildPlatform.defaultToolchainPath
for (i, x) in Process.arguments.enumerated() { for (i, x) in CommandLine.arguments.enumerated() {
if x == Options.CustomFile.rawValue { if x == Options.CustomFile.rawValue {
packageFile = Path(Process.arguments[i+1]) packageFile = Path(CommandLine.arguments[i+1])
} }
if x == Options.Toolchain.rawValue { if x == Options.Toolchain.rawValue {
toolchain = Process.arguments[i+1] toolchain = CommandLine.arguments[i+1]
if toolchain == "xcode" { if toolchain == "xcode" {
toolchain = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" toolchain = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain"
} }
...@@ -68,20 +68,21 @@ for (i, x) in Process.arguments.enumerated() { ...@@ -68,20 +68,21 @@ for (i, x) in Process.arguments.enumerated() {
} }
} }
if x == Options.Platform.rawValue { if x == Options.Platform.rawValue {
let platformString = Process.arguments[i+1] let platformString = CommandLine.arguments[i+1]
Platform.targetPlatform = Platform(string: platformString) Platform.targetPlatform = Platform(string: platformString)
} }
if x == Options.Configuration.rawValue { if x == Options.Configuration.rawValue {
let configurationString = Process.arguments[i+1] let configurationString = CommandLine.arguments[i+1]
currentConfiguration = Configuration(string: configurationString) currentConfiguration = Configuration(string: configurationString)
} }
} }
//build overlays //build overlays
var overlays : [String] = [] var overlays : [String] = []
for (i, x) in Process.arguments.enumerated() { for (i, x) in CommandLine.arguments.enumerated() {
if x == Options.Overlay.rawValue { if x == Options.Overlay.rawValue {
let overlay = Process.arguments[i+1] let overlay = CommandLine.arguments[i+1]
overlays.append(overlay) overlays.append(overlay)
} }
} }
...@@ -122,7 +123,7 @@ do { ...@@ -122,7 +123,7 @@ do {
} }
//usage message //usage message
if Process.arguments.contains("--help") { if CommandLine.arguments.contains("--help") {
usage() usage()
} }
...@@ -134,10 +135,10 @@ func runTask(taskName: String, package: Package) { ...@@ -134,10 +135,10 @@ func runTask(taskName: String, package: Package) {
//choose which task to run //choose which task to run
if Process.arguments.count > 1 { if CommandLine.arguments.count > 1 {
var i = 1 var i = 1
while i < Process.arguments.count { while i < CommandLine.arguments.count {
let arg = Process.arguments[i] let arg = CommandLine.arguments[i]
if Options.allOptions.map({$0.rawValue}).contains(arg) { if Options.allOptions.map({$0.rawValue}).contains(arg) {
i += 1 i += 1
} }
......
Subproject commit b8f458526644c02ad39e46099def2ad5b53514af Subproject commit da8696870102753dbe74f18639bab66d9401740b
...@@ -350,7 +350,7 @@ final class ATllbuild : Tool { ...@@ -350,7 +350,7 @@ final class ATllbuild : Tool {
//We just want to create a state where .atllbuild/objects and .atllbuild/llbuildtmp and .atllbuild/products exists. //We just want to create a state where .atllbuild/objects and .atllbuild/llbuildtmp and .atllbuild/products exists.
//and in particular, without erasing the product directory, since that accumulates build products across //and in particular, without erasing the product directory, since that accumulates build products across
//multiple invocations of atllbuild. //multiple invocations of atllbuild.
if Process.arguments.contains("--clean") { if CommandLine.arguments.contains("--clean") {
let _ = try? FS.removeItem(path: workDirectory.appending("objects"), recursive: true) let _ = try? FS.removeItem(path: workDirectory.appending("objects"), recursive: true)
let _ = try? FS.removeItem(path: workDirectory.appending("llbuildtmp"), recursive: true) let _ = try? FS.removeItem(path: workDirectory.appending("llbuildtmp"), recursive: true)
} }
......
public class Foo { open class Foo {
public init() { } public init() { }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment