File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,15 @@ pub fn build(b: *Build) void {
21
21
const lto = b .option (bool , "lto" , "Enable link time optimization" ) orelse false ;
22
22
23
23
// writing WritingLibFiles isn't implemented on windows
24
- // and zld the only linker suppored on macos
24
+ // and zld the only linker supported on macos
25
25
const is_macos = builtin .os .tag == .macos ;
26
26
const is_windows = builtin .os .tag == .windows ;
27
27
const use_lld = if (is_macos ) false else if (is_windows ) true else switch (optimize ) {
28
28
.Debug = > false ,
29
29
else = > true ,
30
30
};
31
+ const use_lto = if (is_macos ) false else if (use_lld ) lto else false ;
32
+
31
33
const liblmdb = b .addStaticLibrary (.{
32
34
.name = "lmdb" ,
33
35
.target = target ,
@@ -40,7 +42,7 @@ pub fn build(b: *Build) void {
40
42
},
41
43
.use_lld = use_lld ,
42
44
});
43
- liblmdb .want_lto = if ( is_macos ) false else lto ;
45
+ liblmdb .want_lto = use_lto ;
44
46
liblmdb .root_module .sanitize_c = false ;
45
47
46
48
const liblmdb_src = .{
You can’t perform that action at this time.
0 commit comments