| ... | @@ -2120,27 +2120,18 @@ pub const OptionalCSourceLanguage = enum(u3) { | ... | @@ -2120,27 +2120,18 @@ pub const OptionalCSourceLanguage = enum(u3) { |
| 2120 | objective_cpp, | 2120 | objective_cpp, |
| 2121 | assembly, | 2121 | assembly, |
| 2122 | assembly_with_preprocessor, | 2122 | assembly_with_preprocessor, |
| | 2123 | |
| 2123 | default, | 2124 | default, |
| 2124 | | 2125 | |
| 2125 | pub fn init(x: ?std.Build.Module.CSourceLanguage) @This() { | 2126 | pub fn init(x: ?std.Build.Module.CSourceLanguage) @This() { |
| 2126 | return switch (x orelse return .default) { | 2127 | return switch (x orelse return .default) { |
| 2127 | .c => .c, | 2128 | inline else => |tag| @field(@This(), @tagName(tag)), |
| 2128 | .cpp => .cpp, | | |
| 2129 | .objective_c => .objective_c, | | |
| 2130 | .objective_cpp => .objective_cpp, | | |
| 2131 | .assembly => .assembly, | | |
| 2132 | .assembly_with_preprocessor => .assembly_with_preprocessor, | | |
| 2133 | }; | 2129 | }; |
| 2134 | } | 2130 | } |
| 2135 | | 2131 | |
| 2136 | pub fn get(this: @This()) ?std.Build.Module.CSourceLanguage { | 2132 | pub fn get(this: @This()) ?std.Build.Module.CSourceLanguage { |
| 2137 | return switch (this) { | 2133 | return switch (this) { |
| 2138 | .c => .c, | 2134 | inline else => |tag| @field(std.Build.Module.CSourceLanguage, @tagName(tag)), |
| 2139 | .cpp => .cpp, | | |
| 2140 | .objective_c => .objective_c, | | |
| 2141 | .objective_cpp => .objective_cpp, | | |
| 2142 | .assembly => .assembly, | | |
| 2143 | .assembly_with_preprocessor => .assembly_with_preprocessor, | | |
| 2144 | .default => null, | 2135 | .default => null, |
| 2145 | }; | 2136 | }; |
| 2146 | } | 2137 | } |
| ... | @@ -2268,10 +2259,7 @@ pub const TargetQuery = struct { | ... | @@ -2268,10 +2259,7 @@ pub const TargetQuery = struct { |
| 2268 | | 2259 | |
| 2269 | pub fn init(x: std.Target.Query.CpuModel) @This() { | 2260 | pub fn init(x: std.Target.Query.CpuModel) @This() { |
| 2270 | return switch (x) { | 2261 | return switch (x) { |
| 2271 | .native => .native, | 2262 | inline else => |_, tag| @field(@This(), @tagName(tag)), |
| 2272 | .baseline => .baseline, | | |
| 2273 | .determined_by_arch_os => .determined_by_arch_os, | | |
| 2274 | .explicit => .explicit, | | |
| 2275 | }; | 2263 | }; |
| 2276 | } | 2264 | } |
| 2277 | }; | 2265 | }; |
| ... | @@ -2329,71 +2317,13 @@ pub const TargetQuery = struct { | ... | @@ -2329,71 +2317,13 @@ pub const TargetQuery = struct { |
| 2329 | | 2317 | |
| 2330 | pub fn init(x: ?std.Target.Abi) @This() { | 2318 | pub fn init(x: ?std.Target.Abi) @This() { |
| 2331 | return switch (x orelse return .default) { | 2319 | return switch (x orelse return .default) { |
| 2332 | .none => .none, | 2320 | inline else => |tag| @field(@This(), @tagName(tag)), |
| 2333 | .gnu => .gnu, | | |
| 2334 | .gnuabin32 => .gnuabin32, | | |
| 2335 | .gnuabi64 => .gnuabi64, | | |
| 2336 | .gnueabi => .gnueabi, | | |
| 2337 | .gnueabihf => .gnueabihf, | | |
| 2338 | .gnuf32 => .gnuf32, | | |
| 2339 | .gnusf => .gnusf, | | |
| 2340 | .gnux32 => .gnux32, | | |
| 2341 | .eabi => .eabi, | | |
| 2342 | .eabihf => .eabihf, | | |
| 2343 | .abin32 => .abin32, | | |
| 2344 | .x32 => .x32, | | |
| 2345 | .ilp32 => .ilp32, | | |
| 2346 | .android => .android, | | |
| 2347 | .androideabi => .androideabi, | | |
| 2348 | .musl => .musl, | | |
| 2349 | .muslabin32 => .muslabin32, | | |
| 2350 | .muslabi64 => .muslabi64, | | |
| 2351 | .musleabi => .musleabi, | | |
| 2352 | .musleabihf => .musleabihf, | | |
| 2353 | .muslf32 => .muslf32, | | |
| 2354 | .muslsf => .muslsf, | | |
| 2355 | .muslx32 => .muslx32, | | |
| 2356 | .msvc => .msvc, | | |
| 2357 | .itanium => .itanium, | | |
| 2358 | .simulator => .simulator, | | |
| 2359 | .ohos => .ohos, | | |
| 2360 | .ohoseabi => .ohoseabi, | | |
| 2361 | .call0 => .call0, | | |
| 2362 | }; | 2321 | }; |
| 2363 | } | 2322 | } |
| 2364 | | 2323 | |
| 2365 | pub fn unwrap(this: @This()) ?std.Target.Abi { | 2324 | pub fn unwrap(this: @This()) ?std.Target.Abi { |
| 2366 | return switch (this) { | 2325 | return switch (this) { |
| 2367 | .none => .none, | 2326 | inline else => |tag| @field(std.Target.Abi, @tagName(tag)), |
| 2368 | .gnu => .gnu, | | |
| 2369 | .gnuabin32 => .gnuabin32, | | |
| 2370 | .gnuabi64 => .gnuabi64, | | |
| 2371 | .gnueabi => .gnueabi, | | |
| 2372 | .gnueabihf => .gnueabihf, | | |
| 2373 | .gnuf32 => .gnuf32, | | |
| 2374 | .gnusf => .gnusf, | | |
| 2375 | .gnux32 => .gnux32, | | |
| 2376 | .eabi => .eabi, | | |
| 2377 | .eabihf => .eabihf, | | |
| 2378 | .abin32 => .abin32, | | |
| 2379 | .x32 => .x32, | | |
| 2380 | .ilp32 => .ilp32, | | |
| 2381 | .android => .android, | | |
| 2382 | .androideabi => .androideabi, | | |
| 2383 | .musl => .musl, | | |
| 2384 | .muslabin32 => .muslabin32, | | |
| 2385 | .muslabi64 => .muslabi64, | | |
| 2386 | .musleabi => .musleabi, | | |
| 2387 | .musleabihf => .musleabihf, | | |
| 2388 | .muslf32 => .muslf32, | | |
| 2389 | .muslsf => .muslsf, | | |
| 2390 | .muslx32 => .muslx32, | | |
| 2391 | .msvc => .msvc, | | |
| 2392 | .itanium => .itanium, | | |
| 2393 | .simulator => .simulator, | | |
| 2394 | .ohos => .ohos, | | |
| 2395 | .ohoseabi => .ohoseabi, | | |
| 2396 | .call0 => .call0, | | |
| 2397 | .default => null, | 2327 | .default => null, |
| 2398 | }; | 2328 | }; |
| 2399 | } | 2329 | } |
| ... | @@ -2465,132 +2395,13 @@ pub const TargetQuery = struct { | ... | @@ -2465,132 +2395,13 @@ pub const TargetQuery = struct { |
| 2465 | | 2395 | |
| 2466 | pub fn init(x: ?std.Target.Cpu.Arch) @This() { | 2396 | pub fn init(x: ?std.Target.Cpu.Arch) @This() { |
| 2467 | return switch (x orelse return .default) { | 2397 | return switch (x orelse return .default) { |
| 2468 | .aarch64 => .aarch64, | 2398 | inline else => |tag| @field(@This(), @tagName(tag)), |
| 2469 | .aarch64_be => .aarch64_be, | | |
| 2470 | .alpha => .alpha, | | |
| 2471 | .amdgcn => .amdgcn, | | |
| 2472 | .arc => .arc, | | |
| 2473 | .arceb => .arceb, | | |
| 2474 | .arm => .arm, | | |
| 2475 | .armeb => .armeb, | | |
| 2476 | .avr => .avr, | | |
| 2477 | .bpfeb => .bpfeb, | | |
| 2478 | .bpfel => .bpfel, | | |
| 2479 | .csky => .csky, | | |
| 2480 | .ez80 => .ez80, | | |
| 2481 | .hexagon => .hexagon, | | |
| 2482 | .hppa => .hppa, | | |
| 2483 | .hppa64 => .hppa64, | | |
| 2484 | .kalimba => .kalimba, | | |
| 2485 | .kvx => .kvx, | | |
| 2486 | .lanai => .lanai, | | |
| 2487 | .loongarch32 => .loongarch32, | | |
| 2488 | .loongarch64 => .loongarch64, | | |
| 2489 | .m68k => .m68k, | | |
| 2490 | .m88k => .m88k, | | |
| 2491 | .microblaze => .microblaze, | | |
| 2492 | .microblazeel => .microblazeel, | | |
| 2493 | .mips => .mips, | | |
| 2494 | .mipsel => .mipsel, | | |
| 2495 | .mips64 => .mips64, | | |
| 2496 | .mips64el => .mips64el, | | |
| 2497 | .msp430 => .msp430, | | |
| 2498 | .nvptx => .nvptx, | | |
| 2499 | .nvptx64 => .nvptx64, | | |
| 2500 | .or1k => .or1k, | | |
| 2501 | .powerpc => .powerpc, | | |
| 2502 | .powerpcle => .powerpcle, | | |
| 2503 | .powerpc64 => .powerpc64, | | |
| 2504 | .powerpc64le => .powerpc64le, | | |
| 2505 | .propeller => .propeller, | | |
| 2506 | .riscv32 => .riscv32, | | |
| 2507 | .riscv32be => .riscv32be, | | |
| 2508 | .riscv64 => .riscv64, | | |
| 2509 | .riscv64be => .riscv64be, | | |
| 2510 | .s390x => .s390x, | | |
| 2511 | .sh => .sh, | | |
| 2512 | .sheb => .sheb, | | |
| 2513 | .sparc => .sparc, | | |
| 2514 | .sparc64 => .sparc64, | | |
| 2515 | .spirv32 => .spirv32, | | |
| 2516 | .spirv64 => .spirv64, | | |
| 2517 | .thumb => .thumb, | | |
| 2518 | .thumbeb => .thumbeb, | | |
| 2519 | .ve => .ve, | | |
| 2520 | .wasm32 => .wasm32, | | |
| 2521 | .wasm64 => .wasm64, | | |
| 2522 | .x86_16 => .x86_16, | | |
| 2523 | .x86 => .x86, | | |
| 2524 | .x86_64 => .x86_64, | | |
| 2525 | .xcore => .xcore, | | |
| 2526 | .xtensa => .xtensa, | | |
| 2527 | .xtensaeb => .xtensaeb, | | |
| 2528 | }; | 2399 | }; |
| 2529 | } | 2400 | } |
| 2530 | | 2401 | |
| 2531 | pub fn unwrap(this: @This()) ?std.Target.Cpu.Arch { | 2402 | pub fn unwrap(this: @This()) ?std.Target.Cpu.Arch { |
| 2532 | return switch (this) { | 2403 | return switch (this) { |
| 2533 | .aarch64 => .aarch64, | 2404 | inline else => |tag| @field(std.Target.Cpu.Arch, @tagName(tag)), |
| 2534 | .aarch64_be => .aarch64_be, | | |
| 2535 | .alpha => .alpha, | | |
| 2536 | .amdgcn => .amdgcn, | | |
| 2537 | .arc => .arc, | | |
| 2538 | .arceb => .arceb, | | |
| 2539 | .arm => .arm, | | |
| 2540 | .armeb => .armeb, | | |
| 2541 | .avr => .avr, | | |
| 2542 | .bpfeb => .bpfeb, | | |
| 2543 | .bpfel => .bpfel, | | |
| 2544 | .csky => .csky, | | |
| 2545 | .ez80 => .ez80, | | |
| 2546 | .hexagon => .hexagon, | | |
| 2547 | .hppa => .hppa, | | |
| 2548 | .hppa64 => .hppa64, | | |
| 2549 | .kalimba => .kalimba, | | |
| 2550 | .kvx => .kvx, | | |
| 2551 | .lanai => .lanai, | | |
| 2552 | .loongarch32 => .loongarch32, | | |
| 2553 | .loongarch64 => .loongarch64, | | |
| 2554 | .m68k => .m68k, | | |
| 2555 | .m88k => .m88k, | | |
| 2556 | .microblaze => .microblaze, | | |
| 2557 | .microblazeel => .microblazeel, | | |
| 2558 | .mips => .mips, | | |
| 2559 | .mipsel => .mipsel, | | |
| 2560 | .mips64 => .mips64, | | |
| 2561 | .mips64el => .mips64el, | | |
| 2562 | .msp430 => .msp430, | | |
| 2563 | .nvptx => .nvptx, | | |
| 2564 | .nvptx64 => .nvptx64, | | |
| 2565 | .or1k => .or1k, | | |
| 2566 | .powerpc => .powerpc, | | |
| 2567 | .powerpcle => .powerpcle, | | |
| 2568 | .powerpc64 => .powerpc64, | | |
| 2569 | .powerpc64le => .powerpc64le, | | |
| 2570 | .propeller => .propeller, | | |
| 2571 | .riscv32 => .riscv32, | | |
| 2572 | .riscv32be => .riscv32be, | | |
| 2573 | .riscv64 => .riscv64, | | |
| 2574 | .riscv64be => .riscv64be, | | |
| 2575 | .s390x => .s390x, | | |
| 2576 | .sh => .sh, | | |
| 2577 | .sheb => .sheb, | | |
| 2578 | .sparc => .sparc, | | |
| 2579 | .sparc64 => .sparc64, | | |
| 2580 | .spirv32 => .spirv32, | | |
| 2581 | .spirv64 => .spirv64, | | |
| 2582 | .thumb => .thumb, | | |
| 2583 | .thumbeb => .thumbeb, | | |
| 2584 | .ve => .ve, | | |
| 2585 | .wasm32 => .wasm32, | | |
| 2586 | .wasm64 => .wasm64, | | |
| 2587 | .x86_16 => .x86_16, | | |
| 2588 | .x86 => .x86, | | |
| 2589 | .x86_64 => .x86_64, | | |
| 2590 | .xcore => .xcore, | | |
| 2591 | .xtensa => .xtensa, | | |
| 2592 | .xtensaeb => .xtensaeb, | | |
| 2593 | | | |
| 2594 | .default => null, | 2405 | .default => null, |
| 2595 | }; | 2406 | }; |
| 2596 | } | 2407 | } |
| ... | @@ -2649,106 +2460,13 @@ pub const TargetQuery = struct { | ... | @@ -2649,106 +2460,13 @@ pub const TargetQuery = struct { |
| 2649 | | 2460 | |
| 2650 | pub fn init(x: ?std.Target.Os.Tag) @This() { | 2461 | pub fn init(x: ?std.Target.Os.Tag) @This() { |
| 2651 | return switch (x orelse return .default) { | 2462 | return switch (x orelse return .default) { |
| 2652 | .freestanding => .freestanding, | 2463 | inline else => |tag| @field(@This(), @tagName(tag)), |
| 2653 | .other => .other, | | |
| 2654 | .contiki => .contiki, | | |
| 2655 | .fuchsia => .fuchsia, | | |
| 2656 | .hermit => .hermit, | | |
| 2657 | .managarm => .managarm, | | |
| 2658 | .haiku => .haiku, | | |
| 2659 | .hurd => .hurd, | | |
| 2660 | .illumos => .illumos, | | |
| 2661 | .linux => .linux, | | |
| 2662 | .plan9 => .plan9, | | |
| 2663 | .rtems => .rtems, | | |
| 2664 | .serenity => .serenity, | | |
| 2665 | .dragonfly => .dragonfly, | | |
| 2666 | .freebsd => .freebsd, | | |
| 2667 | .netbsd => .netbsd, | | |
| 2668 | .openbsd => .openbsd, | | |
| 2669 | .driverkit => .driverkit, | | |
| 2670 | .ios => .ios, | | |
| 2671 | .maccatalyst => .maccatalyst, | | |
| 2672 | .macos => .macos, | | |
| 2673 | .tvos => .tvos, | | |
| 2674 | .visionos => .visionos, | | |
| 2675 | .watchos => .watchos, | | |
| 2676 | .windows => .windows, | | |
| 2677 | .uefi => .uefi, | | |
| 2678 | .@"3ds" => .@"3ds", | | |
| 2679 | .wiiu => .wiiu, | | |
| 2680 | .@"switch" => .@"switch", | | |
| 2681 | .psx => .psx, | | |
| 2682 | .ps3 => .ps3, | | |
| 2683 | .ps4 => .ps4, | | |
| 2684 | .ps5 => .ps5, | | |
| 2685 | .psp => .psp, | | |
| 2686 | .vita => .vita, | | |
| 2687 | .emscripten => .emscripten, | | |
| 2688 | .wasi => .wasi, | | |
| 2689 | .amdhsa => .amdhsa, | | |
| 2690 | .amdpal => .amdpal, | | |
| 2691 | .cuda => .cuda, | | |
| 2692 | .mesa3d => .mesa3d, | | |
| 2693 | .nvcl => .nvcl, | | |
| 2694 | .opencl => .opencl, | | |
| 2695 | .opengl => .opengl, | | |
| 2696 | .vulkan => .vulkan, | | |
| 2697 | .tios => .tios, | | |
| 2698 | .ashetos => .ashetos, | | |
| 2699 | }; | 2464 | }; |
| 2700 | } | 2465 | } |
| 2701 | | 2466 | |
| 2702 | pub fn unwrap(this: @This()) ?std.Target.Os.Tag { | 2467 | pub fn unwrap(this: @This()) ?std.Target.Os.Tag { |
| 2703 | return switch (this) { | 2468 | return switch (this) { |
| 2704 | .freestanding => .freestanding, | 2469 | inline else => |tag| @field(std.Target.Os.Tag, @tagName(tag)), |
| 2705 | .other => .other, | | |
| 2706 | .contiki => .contiki, | | |
| 2707 | .fuchsia => .fuchsia, | | |
| 2708 | .hermit => .hermit, | | |
| 2709 | .managarm => .managarm, | | |
| 2710 | .haiku => .haiku, | | |
| 2711 | .hurd => .hurd, | | |
| 2712 | .illumos => .illumos, | | |
| 2713 | .linux => .linux, | | |
| 2714 | .plan9 => .plan9, | | |
| 2715 | .rtems => .rtems, | | |
| 2716 | .serenity => .serenity, | | |
| 2717 | .dragonfly => .dragonfly, | | |
| 2718 | .freebsd => .freebsd, | | |
| 2719 | .netbsd => .netbsd, | | |
| 2720 | .openbsd => .openbsd, | | |
| 2721 | .driverkit => .driverkit, | | |
| 2722 | .ios => .ios, | | |
| 2723 | .maccatalyst => .maccatalyst, | | |
| 2724 | .macos => .macos, | | |
| 2725 | .tvos => .tvos, | | |
| 2726 | .visionos => .visionos, | | |
| 2727 | .watchos => .watchos, | | |
| 2728 | .windows => .windows, | | |
| 2729 | .uefi => .uefi, | | |
| 2730 | .@"3ds" => .@"3ds", | | |
| 2731 | .wiiu => .wiiu, | | |
| 2732 | .@"switch" => .@"switch", | | |
| 2733 | .psx => .psx, | | |
| 2734 | .ps3 => .ps3, | | |
| 2735 | .ps4 => .ps4, | | |
| 2736 | .ps5 => .ps5, | | |
| 2737 | .psp => .psp, | | |
| 2738 | .vita => .vita, | | |
| 2739 | .emscripten => .emscripten, | | |
| 2740 | .wasi => .wasi, | | |
| 2741 | .amdhsa => .amdhsa, | | |
| 2742 | .amdpal => .amdpal, | | |
| 2743 | .cuda => .cuda, | | |
| 2744 | .mesa3d => .mesa3d, | | |
| 2745 | .nvcl => .nvcl, | | |
| 2746 | .opencl => .opencl, | | |
| 2747 | .opengl => .opengl, | | |
| 2748 | .vulkan => .vulkan, | | |
| 2749 | .tios => .tios, | | |
| 2750 | .ashetos => .ashetos, | | |
| 2751 | | | |
| 2752 | .default => null, | 2470 | .default => null, |
| 2753 | }; | 2471 | }; |
| 2754 | } | 2472 | } |
| ... | @@ -2769,30 +2487,13 @@ pub const TargetQuery = struct { | ... | @@ -2769,30 +2487,13 @@ pub const TargetQuery = struct { |
| 2769 | | 2487 | |
| 2770 | pub fn init(x: ?std.Target.ObjectFormat) @This() { | 2488 | pub fn init(x: ?std.Target.ObjectFormat) @This() { |
| 2771 | return switch (x orelse return .default) { | 2489 | return switch (x orelse return .default) { |
| 2772 | .c => .c, | 2490 | inline else => |tag| @field(@This(), @tagName(tag)), |
| 2773 | .coff => .coff, | | |
| 2774 | .elf => .elf, | | |
| 2775 | .hex => .hex, | | |
| 2776 | .macho => .macho, | | |
| 2777 | .plan9 => .plan9, | | |
| 2778 | .raw => .raw, | | |
| 2779 | .spirv => .spirv, | | |
| 2780 | .wasm => .wasm, | | |
| 2781 | }; | 2491 | }; |
| 2782 | } | 2492 | } |
| 2783 | | 2493 | |
| 2784 | pub fn unwrap(this: @This()) ?std.Target.ObjectFormat { | 2494 | pub fn unwrap(this: @This()) ?std.Target.ObjectFormat { |
| 2785 | return switch (this) { | 2495 | return switch (this) { |
| 2786 | .c => .c, | 2496 | inline else => |tag| @field(std.Target.ObjectFormat, @tagName(tag)), |
| 2787 | .coff => .coff, | | |
| 2788 | .elf => .elf, | | |
| 2789 | .hex => .hex, | | |
| 2790 | .macho => .macho, | | |
| 2791 | .plan9 => .plan9, | | |
| 2792 | .raw => .raw, | | |
| 2793 | .spirv => .spirv, | | |
| 2794 | .wasm => .wasm, | | |
| 2795 | | | |
| 2796 | .default => null, | 2497 | .default => null, |
| 2797 | }; | 2498 | }; |
| 2798 | } | 2499 | } |