| ... | ... | @@ -3074,22 +3074,24 @@ const CsuObjects = struct { |
| 3074 | 3074 | |
| 3075 | 3075 | var result: CsuObjects = .{}; |
| 3076 | 3076 | |
| 3077 | | // Flatten crt cases. |
| 3078 | | const mode: enum { |
| 3077 | const Mode = enum { |
| 3079 | 3078 | dynamic_lib, |
| 3080 | 3079 | dynamic_exe, |
| 3081 | 3080 | dynamic_pie, |
| 3082 | 3081 | static_exe, |
| 3083 | 3082 | static_pie, |
| 3084 | | } = switch (link_options.output_mode) { |
| 3083 | }; |
| 3084 | |
| 3085 | // Flatten crt cases. |
| 3086 | const mode: Mode = switch (link_options.output_mode) { |
| 3085 | 3087 | .Obj => return CsuObjects{}, |
| 3086 | 3088 | .Lib => switch (link_options.link_mode) { |
| 3087 | 3089 | .Dynamic => .dynamic_lib, |
| 3088 | 3090 | .Static => return CsuObjects{}, |
| 3089 | 3091 | }, |
| 3090 | 3092 | .Exe => switch (link_options.link_mode) { |
| 3091 | | .Dynamic => if (link_options.pie) .dynamic_pie else .dynamic_exe, |
| 3092 | | .Static => if (link_options.pie) .static_pie else .static_exe, |
| 3093 | .Dynamic => if (link_options.pie) Mode.dynamic_pie else Mode.dynamic_exe, |
| 3094 | .Static => if (link_options.pie) Mode.static_pie else Mode.static_exe, |
| 3093 | 3095 | }, |
| 3094 | 3096 | }; |
| 3095 | 3097 | |