Commit ba768614ac

Jakub Konka <kubkon@jakubkonka.com>
2022-06-22 18:51:35
link-tests: frameworks example can test for libobjc autolink in safety modes
1 parent b35e434
Changed files (1)
test
link
macho
frameworks
test/link/macho/frameworks/build.zig
@@ -17,8 +17,13 @@ pub fn build(b: *Builder) void {
     check.check("cmd LOAD_DYLIB");
     check.checkNext("name {*}Cocoa");
 
-    check.check("cmd LOAD_DYLIB");
-    check.checkNext("name {*}libobjc{*}.dylib");
+    switch (mode) {
+        .Debug, .ReleaseSafe => {
+            check.check("cmd LOAD_DYLIB");
+            check.checkNext("name {*}libobjc{*}.dylib");
+        },
+        else => {},
+    }
 
     test_step.dependOn(&check.step);