Skip to content

Commit

Permalink
Use Task
Browse files Browse the repository at this point in the history
  • Loading branch information
STREGA committed Dec 6, 2024
1 parent 7000f69 commit 14e885d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Plugins/PDCPlugin/PDCPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ struct ModuleBuildRequest {
}

@Sendable func buildDeviceModule(_ module: ModuleBuildRequest) async throws {
// try await Task {
try await Task {
switch module.type {
case .product:
print("building \(module.moduleName(for: .device)) (pdex.elf)")
Expand Down Expand Up @@ -556,12 +556,11 @@ struct ModuleBuildRequest {
try ar(["rcs", module.modulePath(for: .device)] + objectFiles)
try ranlib([module.modulePath(for: .device)])
}
// }.value
}.value
}

@Sendable func buildSimulatorModule(_ module: ModuleBuildRequest) async throws {

// try await Task {
try await Task {
switch module.type {
case .product:
print("building \(module.moduleName(for: .simulator)) (pdex.dylib)")
Expand Down Expand Up @@ -618,7 +617,7 @@ struct ModuleBuildRequest {
}
try ar(["rcs", module.modulePath(for: .simulator)] + objectFiles)
}
// }.value
}.value
}

for dep in productDependencies {
Expand Down

0 comments on commit 14e885d

Please sign in to comment.