Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions Sources/Build/describe().swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public func describe(prefix: String, _ conf: Configuration, _ modules: [Module],
throw Error.NoModules
}

let Xcc = Xcc.flatMap{ ["-Xcc", $0] } + extraImports()
let Xcc = Xcc.flatMap{ ["-Xcc", $0] }
let Xld = Xld.flatMap{ ["-Xlinker", $0] }
let prefix = try mkdir(prefix, conf.dirname)
let yaml = try YAML(path: "\(prefix).yaml")
Expand Down Expand Up @@ -192,12 +192,3 @@ extension Product {
return recursiveDependencies(modules.map{$0}).flatMap{ $0 as? SwiftModule }
}
}

private func extraImports() -> [String] {
//FIXME HACK
if let I = getenv("SWIFTPM_EXTRA_IMPORT") {
return ["-I", I]
} else {
return []
}
}
9 changes: 7 additions & 2 deletions Utilities/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,18 @@ def main():
cmd.extend(["-Xlinker", "-rpath", "-Xlinker", embed_rpath])

cmd = [os.path.join(sandbox_path, "bin", "swift-build")]
if args.xctest_path:
env_cmd.append("SWIFTPM_EXTRA_IMPORT=" + args.xctest_path)
if args.foundation_path and args.xctest_path:
core_foundation_path = os.path.join(
args.foundation_path, "usr", "lib", "swift")
# Tell the linker where to look for XCTest, but autolinking
# knows to pass -lXCTest.
cmd.extend(["-Xlinker", "-L", "-Xlinker", args.xctest_path])
# Add an RPATH, so that the tests can be run directly.
cmd.extend(["-Xlinker", "-rpath", "-Xlinker", args.xctest_path])
cmd.extend(["-Xlinker", "-rpath", "-Xlinker", args.foundation_path])
cmd.extend(["-Xswiftc", "-I{}".format(args.xctest_path)])
cmd.extend(["-Xswiftc", "-I{}".format(args.foundation_path)])
cmd.extend(["-Xswiftc", "-I{}".format(core_foundation_path)])

cmd = env_cmd + cmd

Expand Down