id: Idpub fn Type(comptime id: Id) type {
return switch (id) {
.top_level => Build.TopLevelStep,
.compile => Compile,
.install_artifact => InstallArtifact,
.install_file => InstallFile,
.install_dir => InstallDir,
.remove_dir => RemoveDir,
.fail => Fail,
.fmt => Fmt,
.translate_c => TranslateC,
.write_file => WriteFile,
.update_source_files => UpdateSourceFiles,
.run => Run,
.check_file => CheckFile,
.check_object => CheckObject,
.config_header => ConfigHeader,
.objcopy => ObjCopy,
.options => Options,
.custom => @compileError("no type available for custom step"),
};
}top_levelcompileinstall_artifactinstall_fileinstall_dirremove_dirfmttranslate_cwrite_fileupdate_source_filesruncheck_filecheck_objectconfig_headerobjcopyoptionscustompub const Id = enum {
top_level,
compile,
install_artifact,
install_file,
install_dir,
remove_dir,
fail,
fmt,
translate_c,
write_file,
update_source_files,
run,
check_file,
check_object,
config_header,
objcopy,
options,
custom,
pub fn Type(comptime id: Id) type {
return switch (id) {
.top_level => Build.TopLevelStep,
.compile => Compile,
.install_artifact => InstallArtifact,
.install_file => InstallFile,
.install_dir => InstallDir,
.remove_dir => RemoveDir,
.fail => Fail,
.fmt => Fmt,
.translate_c => TranslateC,
.write_file => WriteFile,
.update_source_files => UpdateSourceFiles,
.run => Run,
.check_file => CheckFile,
.check_object => CheckObject,
.config_header => ConfigHeader,
.objcopy => ObjCopy,
.options => Options,
.custom => @compileError("no type available for custom step"),
};
}
}