@@ -145,7 +145,8 @@ let libraryEvolutionCondition = envBoolValue("LIBRARY_EVOLUTION", default: build
145145let compatibilityTestCondition = envBoolValue ( " COMPATIBILITY_TEST " , default : false )
146146
147147let useLocalDeps = envBoolValue ( " USE_LOCAL_DEPS " )
148- let attributeGraphCondition = envBoolValue ( " ATTRIBUTEGRAPH " , default : buildForDarwinPlatform && ! isSPIBuild )
148+ let computeCondition = envBoolValue ( " OPENATTRIBUTESHIMS_COMPUTE " )
149+ let attributeGraphCondition = envBoolValue ( " OPENATTRIBUTESHIMS_ATTRIBUTEGRAPH " , default : buildForDarwinPlatform && ! isSPIBuild )
149150
150151// MARK: - Shared Settings
151152
@@ -228,6 +229,15 @@ extension Target {
228229 swiftSettings . append ( . define ( " OPENATTRIBUTEGRAPH_ATTRIBUTEGRAPH " ) )
229230 self . swiftSettings = swiftSettings
230231 }
232+
233+ func addComputeBinarySettings ( ) {
234+ dependencies . append (
235+ " Compute " ,
236+ )
237+ var swiftSettings = swiftSettings ?? [ ]
238+ swiftSettings . append ( . define ( " OPENATTRIBUTEGRAPH_COMPUTE " ) )
239+ self . swiftSettings = swiftSettings
240+ }
231241}
232242
233243extension [ Platform ] {
@@ -385,7 +395,24 @@ if buildForDarwinPlatform {
385395 package . targets . append ( openAttributeGraphCompatibilityTestsTarget )
386396}
387397
388- if attributeGraphCondition {
398+ if computeCondition {
399+ let computeBinary = envBoolValue ( " OPENATTRIBUTESHIMS_COMPUTE_BINARY " , default : true )
400+ if computeBinary {
401+ let computeVersion = envStringValue ( " OPENATTRIBUTESHIMS_COMPUTE_BINARY_VERSION " , default : " 0.0.1 " )
402+ let computeURL = envStringValue ( " OPENATTRIBUTESHIMS_COMPUTE_BINARY_URL " , default : " https://github.com/Kyle-Ye/Compute/releases/download/ \( computeVersion ) /Compute.xcframework.zip " )
403+ let computeChecksum = envStringValue ( " OPENATTRIBUTESHIMS_COMPUTE_BINARY_CHECKSUM " , default : " f29f7898e23265d0774c94e59f38224b40ba35ba43c669cafe4af983f6c41f5c " )
404+ package . targets . append (
405+ . binaryTarget (
406+ name : " Compute " ,
407+ url : computeURL ,
408+ checksum : computeChecksum
409+ ) ,
410+ )
411+ openAttributeGraphShimsTarget . addComputeBinarySettings ( )
412+ } else {
413+ // TODO
414+ }
415+ } else if attributeGraphCondition {
389416 let privateFrameworkRepo : Package . Dependency
390417 if useLocalDeps {
391418 privateFrameworkRepo = Package . Dependency . package ( path : " ../DarwinPrivateFrameworks " )
0 commit comments