File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ pub const ResolveError = error{
135
135
LibCppRequiresLibC ,
136
136
LibUnwindRequiresLibC ,
137
137
TargetCannotDynamicLink ,
138
+ TargetCannotStaticLinkExecutables ,
138
139
LibCRequiresDynamicLinking ,
139
140
SharedLibrariesRequireDynamicLinking ,
140
141
ExportMemoryAndDynamicIncompatible ,
@@ -360,6 +361,10 @@ pub fn resolve(options: Options) ResolveError!Config {
360
361
if (options .link_mode == .dynamic ) return error .TargetCannotDynamicLink ;
361
362
break :b .static ;
362
363
}
364
+ if (target .os .tag == .fuchsia and options .output_mode == .Exe ) {
365
+ if (options .link_mode == .static ) return error .TargetCannotStaticLinkExecutables ;
366
+ break :b .dynamic ;
367
+ }
363
368
if (explicitly_exe_or_dyn_lib and link_libc and
364
369
(target_util .osRequiresLibC (target ) or
365
370
// For these libcs, Zig can only provide dynamic libc when cross-compiling.
Original file line number Diff line number Diff line change @@ -4118,6 +4118,7 @@ fn createModule(
4118
4118
error .LibCppRequiresLibC = > fatal ("libc++ requires linking libc" , .{}),
4119
4119
error .LibUnwindRequiresLibC = > fatal ("libunwind requires linking libc" , .{}),
4120
4120
error .TargetCannotDynamicLink = > fatal ("dynamic linking unavailable on the specified target" , .{}),
4121
+ error .TargetCannotStaticLinkExecutables = > fatal ("static linking of executables unavailable on the specified target" , .{}),
4121
4122
error .LibCRequiresDynamicLinking = > fatal ("libc of the specified target requires dynamic linking" , .{}),
4122
4123
error .SharedLibrariesRequireDynamicLinking = > fatal ("using shared libraries requires dynamic linking" , .{}),
4123
4124
error .ExportMemoryAndDynamicIncompatible = > fatal ("exporting memory is incompatible with dynamic linking" , .{}),
You can’t perform that action at this time.
0 commit comments