mirror of
https://github.com/apple/container.git
synced 2026-08-28 11:26:32 +00:00
Use container-builder-shim 0.7.0, ensures use of Rosetta. (#858)
- Addresses slow cross-platform builds from #68. - The shim wasn't doing everything needed to ensure the use of Rosetta for `container build`. The new shim adds an `--enable-qemu` option that controls whether `buildkit-qemu-emulator-x86_64 is available; when it is not available, buildkitd will attempt to build natively, meaning Rosetta will execute amd64 binaries.
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ import PackageDescription
|
||||
|
||||
let releaseVersion = ProcessInfo.processInfo.environment["RELEASE_VERSION"] ?? "0.0.0"
|
||||
let gitCommit = ProcessInfo.processInfo.environment["GIT_COMMIT"] ?? "unspecified"
|
||||
let builderShimVersion = "0.6.3"
|
||||
let builderShimVersion = "0.7.0"
|
||||
let scVersion = "0.13.0"
|
||||
|
||||
let package = Package(
|
||||
|
||||
@@ -140,10 +140,12 @@ extension Application {
|
||||
}
|
||||
}
|
||||
|
||||
let shimArguments: [String] = [
|
||||
let useRosetta = DefaultsStore.getBool(key: .buildRosetta) ?? true
|
||||
let shimArguments = [
|
||||
"--debug",
|
||||
"--vsock",
|
||||
]
|
||||
useRosetta ? nil : "--enable-qemu",
|
||||
].compactMap { $0 }
|
||||
|
||||
let id = "buildkit"
|
||||
try ContainerClient.Utility.validEntityName(id)
|
||||
@@ -202,7 +204,7 @@ extension Application {
|
||||
),
|
||||
]
|
||||
// Enable Rosetta only if the user didn't ask to disable it
|
||||
config.rosetta = DefaultsStore.getBool(key: .buildRosetta) ?? true
|
||||
config.rosetta = useRosetta
|
||||
|
||||
let network = try await ClientNetwork.get(id: ClientNetwork.defaultNetworkName)
|
||||
guard case .running(_, let networkStatus) = network else {
|
||||
|
||||
Reference in New Issue
Block a user