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
802802 }
803803 '-use-coroutines' {
804804 res.use_coroutines = true
805- $if macos && arm64 {
805+ $if macos {
806+ arch := $if arm64 { 'arm64' } $else { 'amd64' }
806807 vexe := vexe_path ()
807808 vroot := os.dir (vexe)
808809 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'
810811 if ! os.exists (so_path) {
811812 println ('coroutines .so not found, downloading...' )
812813 // 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} "' )
814815 println ('done!' )
815816 }
816817 res.compile_defines << 'is_coroutine'
817818 res.compile_defines_all << 'is_coroutine'
818819 } $else {
819- println ('coroutines only work on arm64 macos for now' )
820+ println ('coroutines only work on macos for now' )
820821 }
821822 }
822823 else {
You can’t perform that action at this time.
0 commit comments