@@ -98,6 +98,8 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &str, Option<&[&'static str]>)] = &[
98
98
/* Extra values not defined in the built-in targets yet, but used in std */
99
99
( Some ( Mode :: Std ) , "target_env" , Some ( & [ "libnx" ] ) ) ,
100
100
// (Some(Mode::Std), "target_os", Some(&[])),
101
+ ( Some ( Mode :: Std ) , "target_os" , Some ( & [ "zkvm" ] ) ) ,
102
+ ( Some ( Mode :: Std ) , "target_vendor" , Some ( & [ "risc0" ] ) ) ,
101
103
( Some ( Mode :: Std ) , "target_arch" , Some ( & [ "asmjs" , "spirv" , "nvptx" , "xtensa" ] ) ) ,
102
104
/* Extra names used by dependencies */
103
105
// FIXME: Used by serde_json, but we should not be triggering on external dependencies.
@@ -729,6 +731,11 @@ impl Build {
729
731
if self . config . profiler_enabled ( target) {
730
732
features. push_str ( " profiler" ) ;
731
733
}
734
+ // Generate memcpy, etc. FIXME: Remove this once compiler-builtins
735
+ // automatically detects this target.
736
+ if target. contains ( "zkvm" ) {
737
+ features. push_str ( " compiler-builtins-mem" ) ;
738
+ }
732
739
features
733
740
}
734
741
0 commit comments