File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -802,21 +802,22 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
802
802
}
803
803
'-use-coroutines' {
804
804
res.use_coroutines = true
805
- $if macos && arm64 {
805
+ $if macos {
806
+ arch := $if arm64 { 'arm64' } $else { 'amd64' }
806
807
vexe := vexe_path ()
807
808
vroot := os.dir (vexe)
808
809
so_path := os.join_path (vroot, 'thirdparty' , 'photon' , 'photonwrapper.so' )
809
- so_url := 'https://github.com/vlang/photonbin/raw/master/photonwrapper_macos_arm64 .so'
810
+ so_url := 'https://github.com/vlang/photonbin/raw/master/photonwrapper_macos_ ${arch} .so'
810
811
if ! os.exists (so_path) {
811
812
println ('coroutines .so not found, downloading...' )
812
813
// http.download_file(so_url, so_path) or { panic(err) }
813
- os.system ('wget -O "${so_path} " "${so_url} "' )
814
+ os.execute_or_panic ('wget -O "${so_path} " "${so_url} "' )
814
815
println ('done!' )
815
816
}
816
817
res.compile_defines << 'is_coroutine'
817
818
res.compile_defines_all << 'is_coroutine'
818
819
} $else {
819
- println ('coroutines only work on arm64 macos for now' )
820
+ println ('coroutines only work on macos for now' )
820
821
}
821
822
}
822
823
else {
You can’t perform that action at this time.
0 commit comments