Skip to content

Commit ea1f0c3

Browse files
authored
Cannot use Metal properly with Swift Packages (#8974)
Cannot use Metal properly with Swift Packages — even with Apple-recommended plugin workaround The summary here is that when using xcrun to locate metal, xcodebuild is invoked which queries MobileAssets for the location of the metal toolchain. The query to MobileAssets requires the added entitlement. Reference: #8930 ### Modifications: Add expected entitlement
1 parent 5c57a39 commit ea1f0c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/Basics/Sandbox.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ fileprivate func macOSSandboxProfile(
133133
// This is needed to use the UniformTypeIdentifiers API.
134134
contents += "(allow mach-lookup (global-name \"com.apple.lsd.mapdb\"))\n"
135135

136+
// For downloadable Metal toolchain lookups.
137+
contents += "(allow mach-lookup (global-name \"com.apple.mobileassetd.v2\"))\n"
138+
136139
if allowNetworkConnections.filter({ $0 != .none }).isEmpty == false {
137140
// this is used by the system for caching purposes and will lead to log spew if not allowed
138141
contents += "(allow file-write* (regex \"/Users/*/Library/Caches/*/Cache.db*\"))"

0 commit comments

Comments
 (0)