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
16 changes: 16 additions & 0 deletions Scripts/create-xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,28 @@ xcodebuild archive \
-archivePath "$BUILD_DIR/Archives/Compute-iOS-Simulator.xcarchive" \
ENABLE_USER_SCRIPT_SANDBOXING=NO

xcodebuild archive \
-project Xcode/Compute.xcodeproj \
-scheme Compute \
-destination "generic/platform=visionOS" \
-archivePath "$BUILD_DIR/Archives/Compute-visionOS.xcarchive" \
ENABLE_USER_SCRIPT_SANDBOXING=NO

xcodebuild archive \
-project Xcode/Compute.xcodeproj \
-scheme Compute \
-destination "generic/platform=visionOS Simulator" \
-archivePath "$BUILD_DIR/Archives/Compute-visionOS-Simulator.xcarchive" \
ENABLE_USER_SCRIPT_SANDBOXING=NO

rm -rf "$BUILD_DIR/Frameworks/Compute.xcframework"

xcodebuild -create-xcframework \
-archive "$BUILD_DIR/Archives/Compute-macOS.xcarchive" -framework Compute.framework \
-archive "$BUILD_DIR/Archives/Compute-iOS.xcarchive" -framework Compute.framework \
-archive "$BUILD_DIR/Archives/Compute-iOS-Simulator.xcarchive" -framework Compute.framework \
-archive "$BUILD_DIR/Archives/Compute-visionOS.xcarchive" -framework Compute.framework \
-archive "$BUILD_DIR/Archives/Compute-visionOS-Simulator.xcarchive" -framework Compute.framework \
-output "$BUILD_DIR/Frameworks/Compute.xcframework"

# Post-process swiftinterface files to replace ComputeCxx references with Compute
Expand Down
2 changes: 1 addition & 1 deletion Sources/Compute/Attribute/AttributeType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension _AttributeType {
vtable.pointee.self_destroy = { attributeType, body in
attributeType.pointee.attributeBody._destroySelf(body)
}
#if os(iOS) || os(macOS)
#if canImport(Darwin)
vtable.pointee.self_description = { attributeType, body in
let description: String
if let selfType = attributeType.pointee.self_id.type
Expand Down
2 changes: 1 addition & 1 deletion Sources/Compute/Runtime/Metadata.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extension Metadata {
extension Metadata: @retroactive CustomStringConvertible {

public var description: String {
#if os(iOS) || os(macOS)
#if canImport(Darwin)
return __IAGTypeDescription(self) as String
#else
return String(__IAGTypeCopyDescription(self))
Expand Down
Loading