11use rspirv:: spirv:: MemoryModel ;
2- use rustc_target:: spec:: { Cc , LinkerFlavor , PanicStrategy , Target , TargetOptions , Arch } ;
2+ use rustc_target:: spec:: { Arch , Cc , LinkerFlavor , PanicStrategy , Target , TargetOptions } ;
33use spirv_tools:: TargetEnv ;
44
55const ARCH : & str = "spirv" ;
@@ -61,10 +61,13 @@ impl SpirvTarget {
6161 o. emit_debug_gdb_scripts = false ;
6262 o. linker_flavor = LinkerFlavor :: Unix ( Cc :: No ) ;
6363 o. panic_strategy = PanicStrategy :: Abort ;
64- o . env = self . env . to_string ( ) . into ( ) ;
65- o. vendor = self . vendor . clone ( ) . into ( ) ;
64+ // FIXME: this is problematic I believe. Used to be a `Cow` but is now an enum.
65+ o. env = rustc_target :: spec :: Env :: Unspecified ;
6666 // TODO: Investigate if main_needs_argc_argv is useful (for building exes)
6767 o. main_needs_argc_argv = false ;
68+
69+ // FIXME: Should use `o.is_like_gpu = true;`? This changed in https://github.com/rust-lang/rust/pull/148760
70+
6871 o
6972 }
7073
@@ -74,7 +77,7 @@ impl SpirvTarget {
7477 metadata : Default :: default ( ) ,
7578 pointer_width : 32 ,
7679 data_layout : "e-m:e-p:32:32:32-i64:64-n8:16:32:64" . into ( ) ,
77- arch : Arch :: Unknown ( ARCH . into ( ) ) ,
80+ arch : Arch :: Other ( ARCH . into ( ) ) ,
7881 options : self . init_target_opts ( ) ,
7982 }
8083 }
0 commit comments