@@ -60,14 +60,15 @@ python swift_do_package_resolve() {
60
60
61
61
s = d . getVar ('S' )
62
62
b = d . getVar ('B' )
63
+ recipe_sysroot_native = d . getVar ("STAGING_DIR_NATIVE" , True )
63
64
64
65
env = os . environ . copy ()
65
66
66
67
ssh_auth_sock = d . getVar ('BB_ORIGENV' ). get ('SSH_AUTH_SOCK' )
67
68
if ssh_auth_sock :
68
69
env ['SSH_AUTH_SOCK' ] = ssh_auth_sock
69
70
70
- ret = subprocess . call ([' swift', 'package' , 'resolve' , '--package-path' , s , '--build-path' , b ], env = env )
71
+ ret = subprocess . call ([f '{recipe_sysroot_native}/usr/bin/ swift', 'package' , 'resolve' , '--package-path' , s , '--build-path' , b ], env = env )
71
72
if ret != 0 :
72
73
bb . fatal ('swift package resolve failed' )
73
74
@@ -222,13 +223,14 @@ python swift_do_compile() {
222
223
extra_oeswift = shlex . split (d . getVar ('EXTRA_OESWIFT' ))
223
224
ssh_auth_sock = d . getVar ('BB_ORIGENV' ). get ('SSH_AUTH_SOCK' )
224
225
recipe_sysroot = d . getVar ("STAGING_DIR_TARGET" , True )
226
+ recipe_sysroot_native = d . getVar ("STAGING_DIR_NATIVE" , True )
225
227
226
228
env = os . environ . copy ()
227
229
if ssh_auth_sock :
228
230
env ['SSH_AUTH_SOCK' ] = ssh_auth_sock
229
231
env ['SYSROOT' ] = recipe_sysroot
230
232
231
- args = [' swift', 'build' , '--package-path' , s , '--build-path' , b , '-c' , build_mode , '--destination' , destination_json ] + extra_oeswift
233
+ args = [f '{recipe_sysroot_native}/usr/bin/ swift', 'build' , '--package-path' , s , '--build-path' , b , '-c' , build_mode , '--destination' , destination_json ] + extra_oeswift
232
234
233
235
ret = subprocess . call (args , env = env , cwd = s )
234
236
if ret != 0 :
0 commit comments