Commit e4524c67 authored by Drew's avatar Drew

Update to swift preview 3

* We can't use system anymore in preview 3.  This introduces a lot of issues around envrionment variables, which can't be listed in swift :-(.  So we no longer inherit environment variables, we only set the ones we set.
    * We do pass on PWD and PATH, because otherwise that would be terrible
* Toolchain is now a part of platform config instead of something we pass around by hand.
* We now detect xcode 7 / 8 depending on whether we're using a toolchain installed to Xcode.app or Xcode-beta.app.  That's still not right, but fuck it.
parent eff308e9
......@@ -129,7 +129,7 @@ if Process.arguments.contains("--help") {
func runTask(taskName: String, package: Package) {
guard let task = package.tasks[taskName] else { fatalError("No \(taskName) task in build configuration.") }
TaskRunner.runTask(task: task, package: package, toolchain: toolchain)
TaskRunner.runTask(task: task, package: package)
}
......@@ -152,6 +152,8 @@ if focusOnTask == nil {
focusOnTask = "default"
}
Platform.toolchain = toolchain
print("Building package \(package.name)...")
runTask(taskName: focusOnTask!, package: package)
......
......@@ -15,7 +15,7 @@ final class CustomTool: Tool {
init(name: String) {
self.name = String(name.characters[name.characters.startIndex..<name.characters.index(name.characters.startIndex, offsetBy: name.characters.count - 7)])
}
func run(task: Task, toolchain: String) {
func run(task: Task) {
var cmd = "\(self.name) "
for key in task.allKeys.sorted() {
if Task.Option.allOptions.map({$0.rawValue}).contains(key) { continue }
......@@ -24,8 +24,7 @@ final class CustomTool: Tool {
}
cmd += "--\(key) \"\(evaluateSubstitutions(input: value, package: task.package))\" "
}
Shell.environvironment(task: task) {
anarchySystem(cmd)
}
let env = Shell.environment(task: task)
anarchySystem(cmd,environment: env)
}
}
\ No newline at end of file
......@@ -19,5 +19,5 @@ import atpkg
* dependencies together.
*/
final class Nop: Tool {
func run(task: Task, toolchain: String) {}
func run(task: Task) {}
}
......@@ -22,7 +22,7 @@ class PackageAtbin:Tool {
case Compress = "compress"
}
func run(task: Task, toolchain: String) {
func run(task: Task) {
guard let n_ = task[Options.Name.rawValue] else {
fatalError("No \(Options.Name.rawValue) for \(task)")
......@@ -112,7 +112,7 @@ class PackageAtbin:Tool {
for platform in targetPlatforms {
Platform.targetPlatform = platform
//run the underlying atbuild task
TaskRunner.runTask(task: atllbuildTask, package: task.package, toolchain: toolchain, force: true)
TaskRunner.runTask(task: atllbuildTask, package: task.package, force: true)
//copy payload to lipo location
try! FS.copyItem(from: Path(".atllbuild/products/\(payloadFileName)"), to: workDir.join(Path("\(payloadFileName).\(Platform.targetPlatform)")))
......@@ -144,9 +144,7 @@ class PackageAtbin:Tool {
for platform in targetPlatforms {
lipoCmd += "-arch \(platform.architecture) .atllbuild/lipo/\(payloadFileName).\(platform) "
}
if system(lipoCmd) != 0 {
fatalError()
}
anarchySystem(lipoCmd, environment: [:])
}
//generate compiled.atpkg
......@@ -186,9 +184,7 @@ class PackageAtbin:Tool {
default:
fatalError("Unsupported host platform \(Platform.hostPlatform)")
}
if system(cmd) != 0 {
fatalError("Failed to compress archive")
}
anarchySystem(cmd, environment: [:])
}
}
}
\ No newline at end of file
......@@ -38,7 +38,7 @@ class PackageFramework: Tool {
fatalError("packageframework is unsupported on this platform")
#endif
}
func run(task: Task, toolchain: String) {
func run(task: Task) {
print("Warning: package-framework is deprecated and will be removed. Use the plugin instead.")
sleep(5)
compiler_crash() //work around a compiler crash
......@@ -99,8 +99,6 @@ class PackageFramework: Tool {
//codesign
let cmd = "codesign --force --deep --sign - --timestamp=none '\(AVersionPath)'"
print(cmd)
if system(cmd) != 0 {
fatalError("Codesign failed.")
}
anarchySystem(cmd, environment: [:])
}
}
\ No newline at end of file
......@@ -54,6 +54,10 @@ public enum Platform {
case Linux
case iOS(Architecture)
public static var toolchain: String? = nil
static var isXcode7: Bool { return Platform.toolchain!.contains(string: "Xcode.app") }
//generic platforms
case iOSGeneric
......@@ -113,13 +117,22 @@ public enum Platform {
var sdkPath: String? {
switch(self) {
case .OSX:
return "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"
if Platform.isXcode7 {
return "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"
}
return "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
case .Linux:
return nil
case .iOS(.x86_64), .iOS(.i386):
return "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk"
if Platform.isXcode7 {
return "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk"
}
return "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"
case .iOS(.armv7), .iOS(.arm64):
return "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk"
if Platform.isXcode7 {
return "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk"
}
return "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"
case .iOSGeneric:
fatalError("No SDK for generic iOS platform; choose a specific platform or use atbin")
}
......@@ -174,6 +187,34 @@ public enum Platform {
return [Platform.iOS(Architecture.x86_64), Platform.iOS(Architecture.i386), Platform.iOS(Architecture.armv7), Platform.iOS(Architecture.arm64)]
}
}
var targetTriple: String {
switch(self) {
case .OSX, .Linux, .iOSGeneric:
fatalError("Not implemented")
case .iOS(let arch):
switch(arch) {
case .x86_64:
if Platform.isXcode7 {return "x86_64-apple-ios9.3"}
return "x86_64-apple-ios10.0"
case .i386:
if Platform.isXcode7 {return "i386-apple-ios9.3"}
return "i386-apple-ios10.0"
case .arm64:
if Platform.isXcode7 {return "arm64-apple-ios9.3"}
return "arm64-apple-ios10.0"
case .armv7:
if Platform.isXcode7 {return "armv7-apple-ios9.3"}
return "armv7-apple-ios10.0"
}
}
}
}
extension Platform: CustomStringConvertible {
......@@ -191,15 +232,15 @@ extension Platform: CustomStringConvertible {
}
}
func findToolPath(toolName: String, toolchain: String) -> Path {
func findToolPath(toolName: String) -> Path {
if Platform.buildPlatform == Platform.hostPlatform {
//poke around on the filesystem
//look in /usr/bin
let usrBin = Path("\(toolchain)/usr/bin/\(toolName)")
let usrBin = Path("\(Platform.toolchain!)/usr/bin/\(toolName)")
if FS.fileExists(path: usrBin) { return usrBin }
//look in /usr/local/bin
let usrLocalBin = Path("\(toolchain)/usr/local/bin/\(toolName)")
let usrLocalBin = Path("\(Platform.toolchain!)/usr/local/bin/\(toolName)")
if FS.fileExists(path: usrLocalBin) { return usrLocalBin }
//swift-build-tool isn't available in 2.2.
......
......@@ -28,30 +28,27 @@ import atpkg
*/
final class Shell : Tool {
static private func mysetEnv(_ key: String, _ val: String) {
setenv(key,val,1)
}
///Sets the environment for the specified task.
static func environvironment(task: Task, block: () -> ()) {
setenv("ATBUILD_PLATFORM", "\(Platform.targetPlatform)", 1)
setenv("ATBUILD_USER_PATH", userPath().description, 1)
///Builds the environment for the specified task.
static func environment(task: Task) -> [String:String] {
var environment: [String:String] = [:]
environment["ATBUILD_PLATFORM"] = Platform.targetPlatform.description
environment["ATBUILD_USER_PATH"] = userPath().description
if let version = task.package.version {
setenv("ATBUILD_PACKAGE_VERSION", version, 1)
environment["ATBUILD_PACKAGE_VERSION"] = version
}
setenv("ATBUILD_CONFIGURATION", "\(currentConfiguration)",1)
environment["ATBUILD_CONFIGURATION"] = "\(currentConfiguration)"
if let o = currentConfiguration.optimize {
mysetEnv("ATBUILD_CONFIGURATION_OPTIMIZE", o ? "1":"0")
environment["ATBUILD_CONFIGURATION_OPTIMIZE"] = o ? "1":"0"
}
if let o = currentConfiguration.fastCompile {
mysetEnv("ATBUILD_CONFIGURATION_FAST_COMPILE", o ? "1":"0")
environment["ATBUILD_CONFIGURATION_FAST_COMPILE"] = o ? "1":"0"
}
if let o = currentConfiguration.testingEnabled {
mysetEnv("ATBUILD_CONFIGURATION_TESTING_ENABLED", o ? "1":"0")
environment["ATBUILD_CONFIGURATION_TESTING_ENABLED"] = o ? "1":"0"
}
if let o = currentConfiguration.noMagic {
mysetEnv("ATBUILD_CONFIGURATION_NO_MAGIC", o ? "1":"0")
environment["ATBUILD_CONFIGURATION_NO_MAGIC"] = o ? "1":"0"
}
//expose debug configuration info
......@@ -64,8 +61,7 @@ final class Shell : Tool {
case .Stripped:
conf = "stripped"
}
mysetEnv("ATBUILD_CONFIGURATION_DEBUG_INSTRUMENTATION", conf)
environment["ATBUILD_CONFIGURATION_DEBUG_INSTRUMENTATION"] = conf
//does bin path not exist?
//let's create it!
......@@ -73,31 +69,16 @@ final class Shell : Tool {
if !FS.fileExists(path: binPath) {
try! FS.createDirectory(path: binPath)
}
setenv("ATBUILD_BIN_PATH",binPath.description,1)
environment["ATBUILD_BIN_PATH"] = binPath.description
//deal with directory nonsense
let oldPath = try! FS.getWorkingDirectory()
defer {
do {
try FS.changeWorkingDirectory(path: oldPath)
} catch {
print("Can not revert to previous working directory '\(oldPath)': \(error)")
exit(42)
}
}
do {
try FS.changeWorkingDirectory(path: task.importedPath)
}
catch {
print("Cannot change working directory to \(task.importedPath)")
}
block()
environment["PWD"]=String(validatingUTF8: realpath(task.importedPath.description,nil))!
print("pwd set to",environment["PWD"])
return environment
}
func run(task: Task, toolchain: String) {
func run(task: Task) {
guard var script = task["script"]?.string else { fatalError("Invalid 'script' argument to shell tool.") }
script = evaluateSubstitutions(input: script, package: task.package)
Shell.environvironment(task: task) {
anarchySystem(script)
}
let env = Shell.environment(task: task)
anarchySystem(script, environment: env)
}
}
\ No newline at end of file
......@@ -28,16 +28,16 @@ final public class TaskRunner {
///Run the task. Process all dependencies. Deduplicates dependencies.
///- parameter force: Force running the task and all its dependencies, even if we've run it before. This is used for e.g. forcibly reconfiguring the platform of a task and its dependency tree.
///
static public func runTask(task: Task, package: Package, toolchain: String, force: Bool = false) {
static public func runTask(task: Task, package: Package, force: Bool = false) {
for t in package.prunedDependencyGraph(task: task) {
if (!ranTasks.contains(t.qualifiedName)) || force {
TaskRunner.runTaskWithoutDependencies(task: t, package: package, toolchain: toolchain)
TaskRunner.runTaskWithoutDependencies(task: t, package: package)
ranTasks.append(t.qualifiedName)
}
}
}
static private func runTaskWithoutDependencies(task: Task, package: Package, toolchain: String) {
static private func runTaskWithoutDependencies(task: Task, package: Package) {
if task.onlyPlatforms.count > 0 {
if !task.onlyPlatforms.contains(Platform.targetPlatform.description) {
print("Skipping task \(task) on platform \(Platform.targetPlatform)")
......@@ -51,7 +51,7 @@ final public class TaskRunner {
fatalError("Not all required overlays present: \(error)")
}
let tool = toolByName(name: task.tool)
tool.run(task: task, toolchain: toolchain)
tool.run(task: task)
print("Completed task \(task.qualifiedName).")
}
}
\ No newline at end of file
......@@ -37,7 +37,7 @@ let tools: [String:Tool] = [
* can build new ones out of the existing ones.
*/
public protocol Tool {
func run(task: Task, toolchain: String)
func run(task: Task)
}
/**
......@@ -71,15 +71,61 @@ func userPath() -> Path {
}
}
private func _WSTATUS(_ status: CInt) -> CInt {
return status & 0x7f
}
private func WIFEXITED(_ status: CInt) -> Bool {
return _WSTATUS(status) == 0
}
private func WEXITSTATUS(_ status: CInt) -> CInt {
return (status >> 8) & 0xff
}
/// convenience wrapper for waitpid
func waitpid(_ pid: pid_t) -> Int32 {
while true {
var exitStatus: Int32 = 0
let rv = waitpid(pid, &exitStatus, 0)
if rv != -1 {
if WIFEXITED(exitStatus) {
return WEXITSTATUS(exitStatus)
} else {
fatalError("Exit signal")
}
} else if errno == EINTR {
continue // see: man waitpid
} else {
fatalError("waitpid: \(errno)")
}
}
}
///A wrapper for POSIX "system" call.
///If return value is non-zero, we exit (not fatalError)
///See #72 for details.
///- note: This function call is appropriate for commands that are user-perceivable (such as compilation)
///Rather than calls that aren't
func anarchySystem(_ cmd: String) {
let returnCode = system(cmd)
func anarchySystem(_ cmd: String, environment: [String: String]) {
var pid : pid_t = 0
//copy PATH
let path = getenv("PATH")!
var environment = environment
environment["PATH"] = String(validatingUTF8: path)!
let args: [String] = ["sh","-c",cmd]
let argv = args.map{ $0.withCString(strdup) }
let env: [UnsafeMutablePointer<CChar>?] = environment.map{ "\($0.0)=\($0.1)".withCString(strdup) }
let status = posix_spawn(&pid, "/bin/sh",nil,nil,argv + [nil],env + [nil])
if status != 0 {
fatalError("spawn error \(status)")
}
let returnCode = try! waitpid(pid)
if returnCode != 0 {
print("\(cmd) exited with return code \(returnCode)")
exit(42)
fatalError("process \(cmd) error \(returnCode)")
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@ class XCTestRun : Tool {
case TestExecutable = "test-executable"
}
func run(task: Task, toolchain: String) {
func run(task: Task) {
guard let testExecutable = task[Option.TestExecutable.rawValue]?.string else {
fatalError("No \(Option.TestExecutable.rawValue) for XCTestRun task \(task.qualifiedName)")
}
......@@ -62,12 +62,12 @@ class XCTestRun : Tool {
s += "</dict>\n"
s += "</plist>\n"
try s.write(to: workingDirectory + "XCTestRun.xctest/Contents/Info.plist")
anarchySystem("xcrun xctest \(workingDirectory)/XCTestRun.xctest")
anarchySystem("xcrun xctest \(workingDirectory)/XCTestRun.xctest", environment: [:])
} catch {
fatalError("Could not run XCTest: \(error)")
}
case .Linux:
anarchySystem("\(testExecutable)")
anarchySystem("\(testExecutable)", environment: [:])
case .iOS, .iOSGeneric:
fatalError("XCTestRun is not supported for iOS")
......
......@@ -181,9 +181,9 @@ final class ATllbuild : Tool {
if linkSDK {
if let sdkPath = Platform.targetPlatform.sdkPath {
if swiftCPath.description.contains(string: "Xcode-beta") {
if swiftCPath.description.contains(string: "Xcode.app") {
//evil evil hack
args += ["-sdk","/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/"]
args += ["-sdk","/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"]
}
else { args += ["-sdk", sdkPath] }
......@@ -330,7 +330,7 @@ final class ATllbuild : Tool {
}
}
func run(task: Task, toolchain: String) {
func run(task: Task) {
//warn if we don't understand an option
var knownOptions = Options.allOptions.map({$0.rawValue})
......@@ -625,24 +625,11 @@ final class ATllbuild : Tool {
switch(Platform.targetPlatform) {
case .iOS(let arch):
let targetTuple: [String]
switch(arch) {
case .x86_64:
targetTuple = ["-target","x86_64-apple-ios9.3"]
case .i386:
targetTuple = ["-target","i386-apple-ios9.3"]
case .arm64:
targetTuple = ["-target","arm64-apple-ios9.3"]
case .armv7:
targetTuple = ["-target","armv7-apple-ios9.3"]
}
let targetTuple = ["-target",Platform.targetPlatform.targetTriple]
compileOptions.append(contentsOf: targetTuple)
linkOptions.append(contentsOf: targetTuple)
cCompileOptions.append(contentsOf: targetTuple)
cCompileOptions.append(contentsOf: ["-isysroot",Platform.targetPlatform.sdkPath!])
linkOptions.append(contentsOf: ["-Xlinker", "-syslibroot","-Xlinker",Platform.targetPlatform.sdkPath!])
case .OSX, .Linux:
break //not required
......@@ -678,7 +665,7 @@ final class ATllbuild : Tool {
else {
llbuildyamlpath = workDirectory.appending("llbuild.yaml")
}
let swiftCPath = findToolPath(toolName: "swiftc", toolchain: toolchain)
let swiftCPath = findToolPath(toolName: "swiftc")
var enableWMO: Bool
if let wmo = task[Options.WholeModuleOptimization.rawValue]?.bool {
......@@ -776,8 +763,8 @@ final class ATllbuild : Tool {
}
}
let cmd = "\(findToolPath(toolName: "swift-build-tool",toolchain: toolchain)) -f \(llbuildyamlpath)"
anarchySystem(cmd)
let cmd = "\(findToolPath(toolName: "swift-build-tool")) -f \(llbuildyamlpath)"
anarchySystem(cmd, environment: [:])
if task[Options.PublishProduct.rawValue]?.bool == true {
do {
if !FS.isDirectory(path: Path("bin")) {
......
......@@ -20,7 +20,7 @@ commands:
module-name: atfoundation
module-output-path: .atllbuild/products/atfoundation.swiftmodule
temps-path: .atllbuild/llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk", "-enable-testing", "-g", "-Xcc", "-D_GNU_SOURCE", "-g", "-DATBUILD_DEBUG"]
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/", "-enable-testing", "-g", "-Xcc", "-D_GNU_SOURCE", "-g", "-DATBUILD_DEBUG"]
<atllbuild>:
tool: shell
inputs: ["<atllbuild-swiftc>", ".atllbuild/objects/charset.swift.o", ".atllbuild/objects/date.swift.o", ".atllbuild/objects/timeinterval.swift.o", ".atllbuild/objects/file.swift.o", ".atllbuild/objects/fileinfo.swift.o", ".atllbuild/objects/fs.swift.o", ".atllbuild/objects/path.swift.o", ".atllbuild/objects/logger.swift.o", ".atllbuild/objects/replace.swift.o", ".atllbuild/objects/search.swift.o", ".atllbuild/objects/split.swift.o", ".atllbuild/objects/substring.swift.o", ".atllbuild/objects/whitespace.swift.o", ".atllbuild/objects/string.swift.o", ".atllbuild/objects/syserror.swift.o", ".atllbuild/objects/tools.swift.o", ".atllbuild/objects/url.swift.o"]
......
......@@ -20,7 +20,7 @@ commands:
module-name: atpkg
module-output-path: .atllbuild/products/atpkg.swiftmodule
temps-path: .atllbuild/llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk", "-g", "-DATBUILD_DEBUG"]
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/", "-g", "-DATBUILD_DEBUG"]
<atllbuild>:
tool: shell
inputs: ["<atllbuild-swiftc>", ".atllbuild/objects/Binary.swift.o", ".atllbuild/objects/CollectSources.swift.o", ".atllbuild/objects/ExternalDependency.swift.o", ".atllbuild/objects/Package.swift.o", ".atllbuild/objects/Parser.swift.o", ".atllbuild/objects/Scanner.swift.o", ".atllbuild/objects/Tokenization.swift.o", ".atllbuild/objects/Substitutions.swift.o", ".atllbuild/objects/Task.swift.o"]
......
......@@ -20,7 +20,7 @@ commands:
module-name: attools
module-output-path: .atllbuild/products/attools.swiftmodule
temps-path: .atllbuild/llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk", "-g", "-DATBUILD_DEBUG"]
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/", "-g", "-DATBUILD_DEBUG"]
<atllbuild>:
tool: shell
inputs: ["<atllbuild-swiftc>", ".atllbuild/objects/atllbuild.swift.o", ".atllbuild/objects/Configuration.swift.o", ".atllbuild/objects/CustomTool.swift.o", ".atllbuild/objects/Nop.swift.o", ".atllbuild/objects/PackageAtbin.swift.o", ".atllbuild/objects/PackageFramework.swift.o", ".atllbuild/objects/PlatformPaths.swift.o", ".atllbuild/objects/Shell.swift.o", ".atllbuild/objects/TaskRunner.swift.o", ".atllbuild/objects/Tools.swift.o", ".atllbuild/objects/XCTestRun.swift.o"]
......
......@@ -19,7 +19,7 @@ commands:
module-name: atbuild
module-output-path: .atllbuild/products/atbuild.swiftmodule
temps-path: .atllbuild/llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk", "-g", "-DATBUILD_DEBUG"]
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/", "-g", "-DATBUILD_DEBUG"]
<atllbuild>:
tool: shell
inputs: ["<atllbuild-swiftc>", ".atllbuild/objects/main.swift.o", ".atllbuild/products/attools.a", ".atllbuild/products/atpkg.a", ".atllbuild/products/atfoundation.a"]
......
#include <stdio.h>
#include "baz.h"
void bar() {
printf("hello from C");
......
......@@ -19,7 +19,7 @@ commands:
module-name: platforms
module-output-path: .atllbuild/products/platforms.swiftmodule
temps-path: .atllbuild/llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk", "-D", "OSX", "-g", "-DATBUILD_DEBUG"]
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk", "-D", "OSX", "-g", "-DATBUILD_DEBUG"]
<atllbuild>:
tool: shell
inputs: ["<atllbuild-swiftc>", ".atllbuild/objects/main.swift.o"]
......
......@@ -8,7 +8,7 @@ class MyTest : XCTestCase {
}
extension MyTest {
static var allTests : [(String, MyTest -> () throws -> Void)] {
static var allTests : [(String, (MyTest) -> () throws -> Void)] {
return [
("testLoad", testLoad)
]
......
......@@ -21,7 +21,7 @@ class FooTests: XCTestCase {
}
extension FooTests {
static var allTests : [(String, FooTests -> () throws -> Void)] {
static var allTests : [(String, (FooTests) -> () throws -> Void)] {
return [
("testFoo", testFoo)
]
......
......@@ -21,7 +21,7 @@ class FooTests: XCTestCase {
}
extension FooTests {
static var allTests : [(String, FooTests -> () throws -> Void)] {
static var allTests : [(String, (FooTests) -> () throws -> Void)] {
return [
//("testFoo", testFoo) oops! Forgot this one!
]
......
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