| ... | ... | @@ -111,7 +111,7 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step { |
| 111 | 111 | fn testDeadStrip(b: *Build, opts: Options) *Step { |
| 112 | 112 | const test_step = addTestStep(b, "dead-strip", opts); |
| 113 | 113 | |
| 114 | | const obj = addObject(b, opts, .{ .name = "a", .cpp_source_bytes = |
| 114 | const obj = addObject(b, opts, .{ .name = "a", .cpp_source_bytes = |
| 115 | 115 | \\#include <stdio.h> |
| 116 | 116 | \\int two() { return 2; } |
| 117 | 117 | \\int live_var1 = 1; |
| ... | ... | @@ -192,13 +192,13 @@ fn testDeadStrip(b: *Build, opts: Options) *Step { |
| 192 | 192 | fn testDuplicateDefinitions(b: *Build, opts: Options) *Step { |
| 193 | 193 | const test_step = addTestStep(b, "duplicate-definitions", opts); |
| 194 | 194 | |
| 195 | | const obj = addObject(b, opts, .{ .name = "a", .zig_source_bytes = |
| 195 | const obj = addObject(b, opts, .{ .name = "a", .zig_source_bytes = |
| 196 | 196 | \\var x: usize = 1; |
| 197 | 197 | \\export fn strong() void { x += 1; } |
| 198 | 198 | \\export fn weak() void { x += 1; } |
| 199 | 199 | }); |
| 200 | 200 | |
| 201 | | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 201 | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 202 | 202 | \\var x: usize = 1; |
| 203 | 203 | \\export fn strong() void { x += 1; } |
| 204 | 204 | \\comptime { @export(&weakImpl, .{ .name = "weak", .linkage = .weak }); } |
| ... | ... | @@ -223,7 +223,7 @@ fn testDuplicateDefinitions(b: *Build, opts: Options) *Step { |
| 223 | 223 | fn testDeadStripDylibs(b: *Build, opts: Options) *Step { |
| 224 | 224 | const test_step = addTestStep(b, "dead-strip-dylibs", opts); |
| 225 | 225 | |
| 226 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 226 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 227 | 227 | \\#include <objc/runtime.h> |
| 228 | 228 | \\int main() { |
| 229 | 229 | \\ if (objc_getClass("NSObject") == 0) { |
| ... | ... | @@ -272,7 +272,7 @@ fn testDeadStripDylibs(b: *Build, opts: Options) *Step { |
| 272 | 272 | fn testDylib(b: *Build, opts: Options) *Step { |
| 273 | 273 | const test_step = addTestStep(b, "dylib", opts); |
| 274 | 274 | |
| 275 | | const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = |
| 275 | const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = |
| 276 | 276 | \\#include<stdio.h> |
| 277 | 277 | \\char world[] = "world"; |
| 278 | 278 | \\char* hello() { |
| ... | ... | @@ -286,7 +286,7 @@ fn testDylib(b: *Build, opts: Options) *Step { |
| 286 | 286 | check.checkNotPresent("PIE"); |
| 287 | 287 | test_step.dependOn(&check.step); |
| 288 | 288 | |
| 289 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 289 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 290 | 290 | \\#include<stdio.h> |
| 291 | 291 | \\char* hello(); |
| 292 | 292 | \\extern char world[]; |
| ... | ... | @@ -347,7 +347,7 @@ fn testEmptyObject(b: *Build, opts: Options) *Step { |
| 347 | 347 | |
| 348 | 348 | const empty = addObject(b, opts, .{ .name = "empty", .c_source_bytes = "" }); |
| 349 | 349 | |
| 350 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 350 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 351 | 351 | \\#include <stdio.h> |
| 352 | 352 | \\int main() { |
| 353 | 353 | \\ printf("Hello world!"); |
| ... | ... | @@ -377,7 +377,7 @@ fn testEmptyZig(b: *Build, opts: Options) *Step { |
| 377 | 377 | fn testEntryPoint(b: *Build, opts: Options) *Step { |
| 378 | 378 | const test_step = addTestStep(b, "entry-point", opts); |
| 379 | 379 | |
| 380 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 380 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 381 | 381 | \\#include<stdio.h> |
| 382 | 382 | \\int non_main() { |
| 383 | 383 | \\ printf("%d", 42); |
| ... | ... | @@ -599,7 +599,7 @@ fn testHeaderpad(b: *Build, opts: Options) *Step { |
| 599 | 599 | fn testHeaderWeakFlags(b: *Build, opts: Options) *Step { |
| 600 | 600 | const test_step = addTestStep(b, "header-weak-flags", opts); |
| 601 | 601 | |
| 602 | | const obj1 = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 602 | const obj1 = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 603 | 603 | \\.globl _x |
| 604 | 604 | \\.weak_definition _x |
| 605 | 605 | \\_x: |
| ... | ... | @@ -661,7 +661,7 @@ fn testHeaderWeakFlags(b: *Build, opts: Options) *Step { |
| 661 | 661 | } |
| 662 | 662 | |
| 663 | 663 | { |
| 664 | | const exe = addExecutable(b, opts, .{ .name = "main3", .asm_source_bytes = |
| 664 | const exe = addExecutable(b, opts, .{ .name = "main3", .asm_source_bytes = |
| 665 | 665 | \\.globl _main, _x |
| 666 | 666 | \\_x: |
| 667 | 667 | \\ |
| ... | ... | @@ -686,7 +686,7 @@ fn testHeaderWeakFlags(b: *Build, opts: Options) *Step { |
| 686 | 686 | fn testHelloC(b: *Build, opts: Options) *Step { |
| 687 | 687 | const test_step = addTestStep(b, "hello-c", opts); |
| 688 | 688 | |
| 689 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 689 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 690 | 690 | \\#include <stdio.h> |
| 691 | 691 | \\int main() { |
| 692 | 692 | \\ printf("Hello world!\n"); |
| ... | ... | @@ -710,7 +710,7 @@ fn testHelloC(b: *Build, opts: Options) *Step { |
| 710 | 710 | fn testHelloZig(b: *Build, opts: Options) *Step { |
| 711 | 711 | const test_step = addTestStep(b, "hello-zig", opts); |
| 712 | 712 | |
| 713 | | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 713 | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 714 | 714 | \\const std = @import("std"); |
| 715 | 715 | \\pub fn main() void { |
| 716 | 716 | \\ std.fs.File.stdout().writeAll("Hello world!\n") catch @panic("fail"); |
| ... | ... | @@ -731,7 +731,7 @@ fn testLargeBss(b: *Build, opts: Options) *Step { |
| 731 | 731 | // linker I tried misbehave in different ways. This only happened on arm64. I thought that |
| 732 | 732 | // maybe S_GB_ZEROFILL section is an answer to this but it doesn't seem supported by dyld |
| 733 | 733 | // anymore. When I get some free time I will re-investigate this. |
| 734 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 734 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 735 | 735 | \\char arr[0x1000000]; |
| 736 | 736 | \\int main() { |
| 737 | 737 | \\ return arr[2000]; |
| ... | ... | @@ -748,7 +748,7 @@ fn testLargeBss(b: *Build, opts: Options) *Step { |
| 748 | 748 | fn testLayout(b: *Build, opts: Options) *Step { |
| 749 | 749 | const test_step = addTestStep(b, "layout", opts); |
| 750 | 750 | |
| 751 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 751 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 752 | 752 | \\#include <stdio.h> |
| 753 | 753 | \\int main() { |
| 754 | 754 | \\ printf("Hello world!"); |
| ... | ... | @@ -938,7 +938,7 @@ fn testLinkingStaticLib(b: *Build, opts: Options) *Step { |
| 938 | 938 | fn testLinksection(b: *Build, opts: Options) *Step { |
| 939 | 939 | const test_step = addTestStep(b, "linksection", opts); |
| 940 | 940 | |
| 941 | | const obj = addObject(b, opts, .{ .name = "main", .zig_source_bytes = |
| 941 | const obj = addObject(b, opts, .{ .name = "main", .zig_source_bytes = |
| 942 | 942 | \\export var test_global: u32 linksection("__DATA,__TestGlobal") = undefined; |
| 943 | 943 | \\export fn testFn() linksection("__TEXT,__TestFn") callconv(.c) void { |
| 944 | 944 | \\ TestGenericFn("A").f(); |
| ... | ... | @@ -969,7 +969,7 @@ fn testLinksection(b: *Build, opts: Options) *Step { |
| 969 | 969 | fn testMergeLiteralsX64(b: *Build, opts: Options) *Step { |
| 970 | 970 | const test_step = addTestStep(b, "merge-literals-x64", opts); |
| 971 | 971 | |
| 972 | | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 972 | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 973 | 973 | \\.globl _q1 |
| 974 | 974 | \\.globl _s1 |
| 975 | 975 | \\ |
| ... | ... | @@ -994,7 +994,7 @@ fn testMergeLiteralsX64(b: *Build, opts: Options) *Step { |
| 994 | 994 | \\ .quad l._s1 |
| 995 | 995 | }); |
| 996 | 996 | |
| 997 | | const b_o = addObject(b, opts, .{ .name = "b", .asm_source_bytes = |
| 997 | const b_o = addObject(b, opts, .{ .name = "b", .asm_source_bytes = |
| 998 | 998 | \\.globl _q2 |
| 999 | 999 | \\.globl _s2 |
| 1000 | 1000 | \\.globl _s3 |
| ... | ... | @@ -1024,7 +1024,7 @@ fn testMergeLiteralsX64(b: *Build, opts: Options) *Step { |
| 1024 | 1024 | \\ .quad l._s3 |
| 1025 | 1025 | }); |
| 1026 | 1026 | |
| 1027 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1027 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1028 | 1028 | \\#include <stdio.h> |
| 1029 | 1029 | \\extern double q1(); |
| 1030 | 1030 | \\extern double q2(); |
| ... | ... | @@ -1085,7 +1085,7 @@ fn testMergeLiteralsX64(b: *Build, opts: Options) *Step { |
| 1085 | 1085 | fn testMergeLiteralsArm64(b: *Build, opts: Options) *Step { |
| 1086 | 1086 | const test_step = addTestStep(b, "merge-literals-arm64", opts); |
| 1087 | 1087 | |
| 1088 | | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 1088 | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 1089 | 1089 | \\.globl _q1 |
| 1090 | 1090 | \\.globl _s1 |
| 1091 | 1091 | \\ |
| ... | ... | @@ -1110,7 +1110,7 @@ fn testMergeLiteralsArm64(b: *Build, opts: Options) *Step { |
| 1110 | 1110 | \\ .quad l._s1 |
| 1111 | 1111 | }); |
| 1112 | 1112 | |
| 1113 | | const b_o = addObject(b, opts, .{ .name = "b", .asm_source_bytes = |
| 1113 | const b_o = addObject(b, opts, .{ .name = "b", .asm_source_bytes = |
| 1114 | 1114 | \\.globl _q2 |
| 1115 | 1115 | \\.globl _s2 |
| 1116 | 1116 | \\.globl _s3 |
| ... | ... | @@ -1140,7 +1140,7 @@ fn testMergeLiteralsArm64(b: *Build, opts: Options) *Step { |
| 1140 | 1140 | \\ .quad l._s3 |
| 1141 | 1141 | }); |
| 1142 | 1142 | |
| 1143 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1143 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1144 | 1144 | \\#include <stdio.h> |
| 1145 | 1145 | \\extern double q1(); |
| 1146 | 1146 | \\extern double q2(); |
| ... | ... | @@ -1205,7 +1205,7 @@ fn testMergeLiteralsArm64(b: *Build, opts: Options) *Step { |
| 1205 | 1205 | fn testMergeLiteralsArm642(b: *Build, opts: Options) *Step { |
| 1206 | 1206 | const test_step = addTestStep(b, "merge-literals-arm64-2", opts); |
| 1207 | 1207 | |
| 1208 | | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 1208 | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 1209 | 1209 | \\.globl _q1 |
| 1210 | 1210 | \\.globl _s1 |
| 1211 | 1211 | \\ |
| ... | ... | @@ -1225,7 +1225,7 @@ fn testMergeLiteralsArm642(b: *Build, opts: Options) *Step { |
| 1225 | 1225 | \\ .double 1.2345 |
| 1226 | 1226 | }); |
| 1227 | 1227 | |
| 1228 | | const b_o = addObject(b, opts, .{ .name = "b", .asm_source_bytes = |
| 1228 | const b_o = addObject(b, opts, .{ .name = "b", .asm_source_bytes = |
| 1229 | 1229 | \\.globl _q2 |
| 1230 | 1230 | \\.globl _s2 |
| 1231 | 1231 | \\.globl _s3 |
| ... | ... | @@ -1248,7 +1248,7 @@ fn testMergeLiteralsArm642(b: *Build, opts: Options) *Step { |
| 1248 | 1248 | \\ .double 1.2345 |
| 1249 | 1249 | }); |
| 1250 | 1250 | |
| 1251 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1251 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1252 | 1252 | \\#include <stdio.h> |
| 1253 | 1253 | \\extern double q1(); |
| 1254 | 1254 | \\extern double q2(); |
| ... | ... | @@ -1279,7 +1279,7 @@ fn testMergeLiteralsArm642(b: *Build, opts: Options) *Step { |
| 1279 | 1279 | fn testMergeLiteralsAlignment(b: *Build, opts: Options) *Step { |
| 1280 | 1280 | const test_step = addTestStep(b, "merge-literals-alignment", opts); |
| 1281 | 1281 | |
| 1282 | | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 1282 | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 1283 | 1283 | \\.globl _s1 |
| 1284 | 1284 | \\.globl _s2 |
| 1285 | 1285 | \\ |
| ... | ... | @@ -1291,7 +1291,7 @@ fn testMergeLiteralsAlignment(b: *Build, opts: Options) *Step { |
| 1291 | 1291 | \\ .asciz "str2" |
| 1292 | 1292 | }); |
| 1293 | 1293 | |
| 1294 | | const b_o = addObject(b, opts, .{ .name = "b", .asm_source_bytes = |
| 1294 | const b_o = addObject(b, opts, .{ .name = "b", .asm_source_bytes = |
| 1295 | 1295 | \\.globl _s3 |
| 1296 | 1296 | \\.globl _s4 |
| 1297 | 1297 | \\ |
| ... | ... | @@ -1303,7 +1303,7 @@ fn testMergeLiteralsAlignment(b: *Build, opts: Options) *Step { |
| 1303 | 1303 | \\ .asciz "str2" |
| 1304 | 1304 | }); |
| 1305 | 1305 | |
| 1306 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1306 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1307 | 1307 | \\#include <assert.h> |
| 1308 | 1308 | \\#include <stdint.h> |
| 1309 | 1309 | \\#include <stdio.h> |
| ... | ... | @@ -1358,7 +1358,7 @@ fn testMergeLiteralsAlignment(b: *Build, opts: Options) *Step { |
| 1358 | 1358 | fn testMergeLiteralsObjc(b: *Build, opts: Options) *Step { |
| 1359 | 1359 | const test_step = addTestStep(b, "merge-literals-objc", opts); |
| 1360 | 1360 | |
| 1361 | | const main_o = addObject(b, opts, .{ .name = "main", .objc_source_bytes = |
| 1361 | const main_o = addObject(b, opts, .{ .name = "main", .objc_source_bytes = |
| 1362 | 1362 | \\#import <Foundation/Foundation.h>; |
| 1363 | 1363 | \\ |
| 1364 | 1364 | \\extern void foo(); |
| ... | ... | @@ -1376,7 +1376,7 @@ fn testMergeLiteralsObjc(b: *Build, opts: Options) *Step { |
| 1376 | 1376 | \\} |
| 1377 | 1377 | }); |
| 1378 | 1378 | |
| 1379 | | const a_o = addObject(b, opts, .{ .name = "a", .objc_source_bytes = |
| 1379 | const a_o = addObject(b, opts, .{ .name = "a", .objc_source_bytes = |
| 1380 | 1380 | \\#import <Foundation/Foundation.h>; |
| 1381 | 1381 | \\ |
| 1382 | 1382 | \\void foo() { |
| ... | ... | @@ -1461,7 +1461,7 @@ fn testMhExecuteHeader(b: *Build, opts: Options) *Step { |
| 1461 | 1461 | fn testNoDeadStrip(b: *Build, opts: Options) *Step { |
| 1462 | 1462 | const test_step = addTestStep(b, "no-dead-strip", opts); |
| 1463 | 1463 | |
| 1464 | | const exe = addExecutable(b, opts, .{ .name = "name", .c_source_bytes = |
| 1464 | const exe = addExecutable(b, opts, .{ .name = "name", .c_source_bytes = |
| 1465 | 1465 | \\__attribute__((used)) int bogus1 = 0; |
| 1466 | 1466 | \\int bogus2 = 0; |
| 1467 | 1467 | \\int foo = 42; |
| ... | ... | @@ -1545,7 +1545,7 @@ fn testNeededLibrary(b: *Build, opts: Options) *Step { |
| 1545 | 1545 | fn testObjc(b: *Build, opts: Options) *Step { |
| 1546 | 1546 | const test_step = addTestStep(b, "objc", opts); |
| 1547 | 1547 | |
| 1548 | | const lib = addStaticLibrary(b, opts, .{ .name = "a", .objc_source_bytes = |
| 1548 | const lib = addStaticLibrary(b, opts, .{ .name = "a", .objc_source_bytes = |
| 1549 | 1549 | \\#import <Foundation/Foundation.h> |
| 1550 | 1550 | \\@interface Foo : NSObject |
| 1551 | 1551 | \\@end |
| ... | ... | @@ -1602,7 +1602,7 @@ fn testObjcpp(b: *Build, opts: Options) *Step { |
| 1602 | 1602 | ); |
| 1603 | 1603 | }; |
| 1604 | 1604 | |
| 1605 | | const foo_o = addObject(b, opts, .{ .name = "foo", .objcpp_source_bytes = |
| 1605 | const foo_o = addObject(b, opts, .{ .name = "foo", .objcpp_source_bytes = |
| 1606 | 1606 | \\#import "Foo.h" |
| 1607 | 1607 | \\@implementation Foo |
| 1608 | 1608 | \\- (NSString *)name |
| ... | ... | @@ -1615,7 +1615,7 @@ fn testObjcpp(b: *Build, opts: Options) *Step { |
| 1615 | 1615 | foo_o.root_module.addIncludePath(foo_h.dirname()); |
| 1616 | 1616 | foo_o.root_module.link_libcpp = true; |
| 1617 | 1617 | |
| 1618 | | const exe = addExecutable(b, opts, .{ .name = "main", .objcpp_source_bytes = |
| 1618 | const exe = addExecutable(b, opts, .{ .name = "main", .objcpp_source_bytes = |
| 1619 | 1619 | \\#import "Foo.h" |
| 1620 | 1620 | \\#import <assert.h> |
| 1621 | 1621 | \\#include <iostream> |
| ... | ... | @@ -1679,7 +1679,7 @@ fn testPagezeroSize(b: *Build, opts: Options) *Step { |
| 1679 | 1679 | fn testReexportsZig(b: *Build, opts: Options) *Step { |
| 1680 | 1680 | const test_step = addTestStep(b, "reexports-zig", opts); |
| 1681 | 1681 | |
| 1682 | | const lib = addStaticLibrary(b, opts, .{ .name = "a", .zig_source_bytes = |
| 1682 | const lib = addStaticLibrary(b, opts, .{ .name = "a", .zig_source_bytes = |
| 1683 | 1683 | \\const x: i32 = 42; |
| 1684 | 1684 | \\export fn foo() i32 { |
| 1685 | 1685 | \\ return x; |
| ... | ... | @@ -1689,7 +1689,7 @@ fn testReexportsZig(b: *Build, opts: Options) *Step { |
| 1689 | 1689 | \\} |
| 1690 | 1690 | }); |
| 1691 | 1691 | |
| 1692 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 1692 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 1693 | 1693 | \\extern int foo(); |
| 1694 | 1694 | \\extern int bar(); |
| 1695 | 1695 | \\int main() { |
| ... | ... | @@ -1708,7 +1708,7 @@ fn testReexportsZig(b: *Build, opts: Options) *Step { |
| 1708 | 1708 | fn testRelocatable(b: *Build, opts: Options) *Step { |
| 1709 | 1709 | const test_step = addTestStep(b, "relocatable", opts); |
| 1710 | 1710 | |
| 1711 | | const a_o = addObject(b, opts, .{ .name = "a", .cpp_source_bytes = |
| 1711 | const a_o = addObject(b, opts, .{ .name = "a", .cpp_source_bytes = |
| 1712 | 1712 | \\#include <stdexcept> |
| 1713 | 1713 | \\int try_me() { |
| 1714 | 1714 | \\ throw std::runtime_error("Oh no!"); |
| ... | ... | @@ -1716,14 +1716,14 @@ fn testRelocatable(b: *Build, opts: Options) *Step { |
| 1716 | 1716 | }); |
| 1717 | 1717 | a_o.root_module.link_libcpp = true; |
| 1718 | 1718 | |
| 1719 | | const b_o = addObject(b, opts, .{ .name = "b", .cpp_source_bytes = |
| 1719 | const b_o = addObject(b, opts, .{ .name = "b", .cpp_source_bytes = |
| 1720 | 1720 | \\extern int try_me(); |
| 1721 | 1721 | \\int try_again() { |
| 1722 | 1722 | \\ return try_me(); |
| 1723 | 1723 | \\} |
| 1724 | 1724 | }); |
| 1725 | 1725 | |
| 1726 | | const main_o = addObject(b, opts, .{ .name = "main", .cpp_source_bytes = |
| 1726 | const main_o = addObject(b, opts, .{ .name = "main", .cpp_source_bytes = |
| 1727 | 1727 | \\#include <iostream> |
| 1728 | 1728 | \\#include <stdexcept> |
| 1729 | 1729 | \\extern int try_again(); |
| ... | ... | @@ -1776,7 +1776,7 @@ fn testRelocatable(b: *Build, opts: Options) *Step { |
| 1776 | 1776 | fn testRelocatableZig(b: *Build, opts: Options) *Step { |
| 1777 | 1777 | const test_step = addTestStep(b, "relocatable-zig", opts); |
| 1778 | 1778 | |
| 1779 | | const a_o = addObject(b, opts, .{ .name = "a", .zig_source_bytes = |
| 1779 | const a_o = addObject(b, opts, .{ .name = "a", .zig_source_bytes = |
| 1780 | 1780 | \\const std = @import("std"); |
| 1781 | 1781 | \\export var foo: i32 = 0; |
| 1782 | 1782 | \\export fn incrFoo() void { |
| ... | ... | @@ -1785,7 +1785,7 @@ fn testRelocatableZig(b: *Build, opts: Options) *Step { |
| 1785 | 1785 | \\} |
| 1786 | 1786 | }); |
| 1787 | 1787 | |
| 1788 | | const b_o = addObject(b, opts, .{ .name = "b", .zig_source_bytes = |
| 1788 | const b_o = addObject(b, opts, .{ .name = "b", .zig_source_bytes = |
| 1789 | 1789 | \\const std = @import("std"); |
| 1790 | 1790 | \\extern var foo: i32; |
| 1791 | 1791 | \\export fn decrFoo() void { |
| ... | ... | @@ -1794,7 +1794,7 @@ fn testRelocatableZig(b: *Build, opts: Options) *Step { |
| 1794 | 1794 | \\} |
| 1795 | 1795 | }); |
| 1796 | 1796 | |
| 1797 | | const main_o = addObject(b, opts, .{ .name = "main", .zig_source_bytes = |
| 1797 | const main_o = addObject(b, opts, .{ .name = "main", .zig_source_bytes = |
| 1798 | 1798 | \\const std = @import("std"); |
| 1799 | 1799 | \\extern var foo: i32; |
| 1800 | 1800 | \\extern fn incrFoo() void; |
| ... | ... | @@ -1827,7 +1827,7 @@ fn testRelocatableZig(b: *Build, opts: Options) *Step { |
| 1827 | 1827 | fn testSearchStrategy(b: *Build, opts: Options) *Step { |
| 1828 | 1828 | const test_step = addTestStep(b, "search-strategy", opts); |
| 1829 | 1829 | |
| 1830 | | const obj = addObject(b, opts, .{ .name = "a", .c_source_bytes = |
| 1830 | const obj = addObject(b, opts, .{ .name = "a", .c_source_bytes = |
| 1831 | 1831 | \\#include<stdio.h> |
| 1832 | 1832 | \\char world[] = "world"; |
| 1833 | 1833 | \\char* hello() { |
| ... | ... | @@ -1841,7 +1841,7 @@ fn testSearchStrategy(b: *Build, opts: Options) *Step { |
| 1841 | 1841 | const dylib = addSharedLibrary(b, opts, .{ .name = "a" }); |
| 1842 | 1842 | dylib.root_module.addObject(obj); |
| 1843 | 1843 | |
| 1844 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1844 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 1845 | 1845 | \\#include<stdio.h> |
| 1846 | 1846 | \\char* hello(); |
| 1847 | 1847 | \\extern char world[]; |
| ... | ... | @@ -1975,7 +1975,7 @@ fn testSectionBoundarySymbols(b: *Build, opts: Options) *Step { |
| 1975 | 1975 | fn testSectionBoundarySymbols2(b: *Build, opts: Options) *Step { |
| 1976 | 1976 | const test_step = addTestStep(b, "section-boundary-symbols-2", opts); |
| 1977 | 1977 | |
| 1978 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 1978 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 1979 | 1979 | \\#include <stdio.h> |
| 1980 | 1980 | \\struct pair { int a; int b; }; |
| 1981 | 1981 | \\struct pair first __attribute__((section("__DATA,__pairs"))) = { 1, 2 }; |
| ... | ... | @@ -2012,11 +2012,11 @@ fn testSectionBoundarySymbols2(b: *Build, opts: Options) *Step { |
| 2012 | 2012 | fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step { |
| 2013 | 2013 | const test_step = addTestStep(b, "segment-boundary-symbols", opts); |
| 2014 | 2014 | |
| 2015 | | const obj1 = addObject(b, opts, .{ .name = "a", .cpp_source_bytes = |
| 2015 | const obj1 = addObject(b, opts, .{ .name = "a", .cpp_source_bytes = |
| 2016 | 2016 | \\constexpr const char* MESSAGE __attribute__((used, section("__DATA_CONST_1,__message_ptr"))) = "codebase"; |
| 2017 | 2017 | }); |
| 2018 | 2018 | |
| 2019 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 2019 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 2020 | 2020 | \\#include <stdio.h> |
| 2021 | 2021 | \\const char* interop(); |
| 2022 | 2022 | \\int main() { |
| ... | ... | @@ -2026,7 +2026,7 @@ fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step { |
| 2026 | 2026 | }); |
| 2027 | 2027 | |
| 2028 | 2028 | { |
| 2029 | | const obj2 = addObject(b, opts, .{ .name = "b", .cpp_source_bytes = |
| 2029 | const obj2 = addObject(b, opts, .{ .name = "b", .cpp_source_bytes = |
| 2030 | 2030 | \\extern const char* message_pointer __asm("segment$start$__DATA_CONST_1"); |
| 2031 | 2031 | \\extern "C" const char* interop() { |
| 2032 | 2032 | \\ return message_pointer; |
| ... | ... | @@ -2049,7 +2049,7 @@ fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step { |
| 2049 | 2049 | } |
| 2050 | 2050 | |
| 2051 | 2051 | { |
| 2052 | | const obj2 = addObject(b, opts, .{ .name = "c", .cpp_source_bytes = |
| 2052 | const obj2 = addObject(b, opts, .{ .name = "c", .cpp_source_bytes = |
| 2053 | 2053 | \\extern const char* message_pointer __asm("segment$start$__DATA_1"); |
| 2054 | 2054 | \\extern "C" const char* interop() { |
| 2055 | 2055 | \\ return message_pointer; |
| ... | ... | @@ -2080,21 +2080,21 @@ fn testSegmentBoundarySymbols(b: *Build, opts: Options) *Step { |
| 2080 | 2080 | fn testSymbolStabs(b: *Build, opts: Options) *Step { |
| 2081 | 2081 | const test_step = addTestStep(b, "symbol-stabs", opts); |
| 2082 | 2082 | |
| 2083 | | const a_o = addObject(b, opts, .{ .name = "a", .c_source_bytes = |
| 2083 | const a_o = addObject(b, opts, .{ .name = "a", .c_source_bytes = |
| 2084 | 2084 | \\int foo = 42; |
| 2085 | 2085 | \\int getFoo() { |
| 2086 | 2086 | \\ return foo; |
| 2087 | 2087 | \\} |
| 2088 | 2088 | }); |
| 2089 | 2089 | |
| 2090 | | const b_o = addObject(b, opts, .{ .name = "b", .c_source_bytes = |
| 2090 | const b_o = addObject(b, opts, .{ .name = "b", .c_source_bytes = |
| 2091 | 2091 | \\int bar = 24; |
| 2092 | 2092 | \\int getBar() { |
| 2093 | 2093 | \\ return bar; |
| 2094 | 2094 | \\} |
| 2095 | 2095 | }); |
| 2096 | 2096 | |
| 2097 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 2097 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 2098 | 2098 | \\#include <stdio.h> |
| 2099 | 2099 | \\extern int getFoo(); |
| 2100 | 2100 | \\extern int getBar(); |
| ... | ... | @@ -2164,7 +2164,7 @@ fn testTbdv3(b: *Build, opts: Options) *Step { |
| 2164 | 2164 | ); |
| 2165 | 2165 | }; |
| 2166 | 2166 | |
| 2167 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2167 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2168 | 2168 | \\#include <stdio.h> |
| 2169 | 2169 | \\int getFoo(); |
| 2170 | 2170 | \\int main() { |
| ... | ... | @@ -2211,7 +2211,7 @@ fn testTentative(b: *Build, opts: Options) *Step { |
| 2211 | 2211 | fn testThunks(b: *Build, opts: Options) *Step { |
| 2212 | 2212 | const test_step = addTestStep(b, "thunks", opts); |
| 2213 | 2213 | |
| 2214 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2214 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2215 | 2215 | \\#include <stdio.h> |
| 2216 | 2216 | \\void bar() { |
| 2217 | 2217 | \\ printf("bar"); |
| ... | ... | @@ -2243,14 +2243,14 @@ fn testThunks(b: *Build, opts: Options) *Step { |
| 2243 | 2243 | fn testTls(b: *Build, opts: Options) *Step { |
| 2244 | 2244 | const test_step = addTestStep(b, "tls", opts); |
| 2245 | 2245 | |
| 2246 | | const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = |
| 2246 | const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = |
| 2247 | 2247 | \\_Thread_local int a; |
| 2248 | 2248 | \\int getA() { |
| 2249 | 2249 | \\ return a; |
| 2250 | 2250 | \\} |
| 2251 | 2251 | }); |
| 2252 | 2252 | |
| 2253 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2253 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2254 | 2254 | \\#include<stdio.h> |
| 2255 | 2255 | \\extern _Thread_local int a; |
| 2256 | 2256 | \\extern int getA(); |
| ... | ... | @@ -2294,7 +2294,7 @@ fn testTlsPointers(b: *Build, opts: Options) *Step { |
| 2294 | 2294 | ); |
| 2295 | 2295 | }; |
| 2296 | 2296 | |
| 2297 | | const bar_o = addObject(b, opts, .{ .name = "bar", .cpp_source_bytes = |
| 2297 | const bar_o = addObject(b, opts, .{ .name = "bar", .cpp_source_bytes = |
| 2298 | 2298 | \\#include "foo.h" |
| 2299 | 2299 | \\int bar() { |
| 2300 | 2300 | \\ int v1 = Foo<int>::getVar(); |
| ... | ... | @@ -2304,7 +2304,7 @@ fn testTlsPointers(b: *Build, opts: Options) *Step { |
| 2304 | 2304 | bar_o.root_module.addIncludePath(foo_h.dirname()); |
| 2305 | 2305 | bar_o.root_module.link_libcpp = true; |
| 2306 | 2306 | |
| 2307 | | const baz_o = addObject(b, opts, .{ .name = "baz", .cpp_source_bytes = |
| 2307 | const baz_o = addObject(b, opts, .{ .name = "baz", .cpp_source_bytes = |
| 2308 | 2308 | \\#include "foo.h" |
| 2309 | 2309 | \\int baz() { |
| 2310 | 2310 | \\ int v1 = Foo<unsigned>::getVar(); |
| ... | ... | @@ -2314,7 +2314,7 @@ fn testTlsPointers(b: *Build, opts: Options) *Step { |
| 2314 | 2314 | baz_o.root_module.addIncludePath(foo_h.dirname()); |
| 2315 | 2315 | baz_o.root_module.link_libcpp = true; |
| 2316 | 2316 | |
| 2317 | | const main_o = addObject(b, opts, .{ .name = "main", .cpp_source_bytes = |
| 2317 | const main_o = addObject(b, opts, .{ .name = "main", .cpp_source_bytes = |
| 2318 | 2318 | \\extern int bar(); |
| 2319 | 2319 | \\extern int baz(); |
| 2320 | 2320 | \\int main() { |
| ... | ... | @@ -2342,7 +2342,7 @@ fn testTlsPointers(b: *Build, opts: Options) *Step { |
| 2342 | 2342 | fn testTlsLargeTbss(b: *Build, opts: Options) *Step { |
| 2343 | 2343 | const test_step = addTestStep(b, "tls-large-tbss", opts); |
| 2344 | 2344 | |
| 2345 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2345 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2346 | 2346 | \\#include <stdio.h> |
| 2347 | 2347 | \\_Thread_local int x[0x8000]; |
| 2348 | 2348 | \\_Thread_local int y[0x8000]; |
| ... | ... | @@ -2363,7 +2363,7 @@ fn testTlsLargeTbss(b: *Build, opts: Options) *Step { |
| 2363 | 2363 | fn testTlsZig(b: *Build, opts: Options) *Step { |
| 2364 | 2364 | const test_step = addTestStep(b, "tls-zig", opts); |
| 2365 | 2365 | |
| 2366 | | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 2366 | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 2367 | 2367 | \\const std = @import("std"); |
| 2368 | 2368 | \\threadlocal var x: i32 = 0; |
| 2369 | 2369 | \\threadlocal var y: i32 = -1; |
| ... | ... | @@ -2390,7 +2390,7 @@ fn testTlsZig(b: *Build, opts: Options) *Step { |
| 2390 | 2390 | fn testTwoLevelNamespace(b: *Build, opts: Options) *Step { |
| 2391 | 2391 | const test_step = addTestStep(b, "two-level-namespace", opts); |
| 2392 | 2392 | |
| 2393 | | const liba = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = |
| 2393 | const liba = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = |
| 2394 | 2394 | \\#include <stdio.h> |
| 2395 | 2395 | \\int foo = 1; |
| 2396 | 2396 | \\int* ptr_to_foo = &foo; |
| ... | ... | @@ -2411,7 +2411,7 @@ fn testTwoLevelNamespace(b: *Build, opts: Options) *Step { |
| 2411 | 2411 | test_step.dependOn(&check.step); |
| 2412 | 2412 | } |
| 2413 | 2413 | |
| 2414 | | const libb = addSharedLibrary(b, opts, .{ .name = "b", .c_source_bytes = |
| 2414 | const libb = addSharedLibrary(b, opts, .{ .name = "b", .c_source_bytes = |
| 2415 | 2415 | \\#include <stdio.h> |
| 2416 | 2416 | \\int foo = 2; |
| 2417 | 2417 | \\int* ptr_to_foo = &foo; |
| ... | ... | @@ -2432,7 +2432,7 @@ fn testTwoLevelNamespace(b: *Build, opts: Options) *Step { |
| 2432 | 2432 | test_step.dependOn(&check.step); |
| 2433 | 2433 | } |
| 2434 | 2434 | |
| 2435 | | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 2435 | const main_o = addObject(b, opts, .{ .name = "main", .c_source_bytes = |
| 2436 | 2436 | \\#include <stdio.h> |
| 2437 | 2437 | \\int getFoo(); |
| 2438 | 2438 | \\extern int* ptr_to_foo; |
| ... | ... | @@ -2632,12 +2632,12 @@ fn testUndefinedFlag(b: *Build, opts: Options) *Step { |
| 2632 | 2632 | fn testUnresolvedError(b: *Build, opts: Options) *Step { |
| 2633 | 2633 | const test_step = addTestStep(b, "unresolved-error", opts); |
| 2634 | 2634 | |
| 2635 | | const obj = addObject(b, opts, .{ .name = "a", .zig_source_bytes = |
| 2635 | const obj = addObject(b, opts, .{ .name = "a", .zig_source_bytes = |
| 2636 | 2636 | \\extern fn foo() i32; |
| 2637 | 2637 | \\export fn bar() i32 { return foo() + 1; } |
| 2638 | 2638 | }); |
| 2639 | 2639 | |
| 2640 | | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 2640 | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 2641 | 2641 | \\const std = @import("std"); |
| 2642 | 2642 | \\extern fn foo() i32; |
| 2643 | 2643 | \\extern fn bar() i32; |
| ... | ... | @@ -2668,7 +2668,7 @@ fn testUnresolvedError(b: *Build, opts: Options) *Step { |
| 2668 | 2668 | fn testUnresolvedError2(b: *Build, opts: Options) *Step { |
| 2669 | 2669 | const test_step = addTestStep(b, "unresolved-error-2", opts); |
| 2670 | 2670 | |
| 2671 | | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 2671 | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 2672 | 2672 | \\pub fn main() !void { |
| 2673 | 2673 | \\ const msg_send_fn = @extern( |
| 2674 | 2674 | \\ *const fn () callconv(.c) usize, |
| ... | ... | @@ -2740,7 +2740,7 @@ fn testUnwindInfo(b: *Build, opts: Options) *Step { |
| 2740 | 2740 | ); |
| 2741 | 2741 | }; |
| 2742 | 2742 | |
| 2743 | | const main_o = addObject(b, opts, .{ .name = "main", .cpp_source_bytes = |
| 2743 | const main_o = addObject(b, opts, .{ .name = "main", .cpp_source_bytes = |
| 2744 | 2744 | \\#include "all.h" |
| 2745 | 2745 | \\#include <cstdio> |
| 2746 | 2746 | \\ |
| ... | ... | @@ -2769,7 +2769,7 @@ fn testUnwindInfo(b: *Build, opts: Options) *Step { |
| 2769 | 2769 | main_o.root_module.addIncludePath(all_h.dirname()); |
| 2770 | 2770 | main_o.root_module.link_libcpp = true; |
| 2771 | 2771 | |
| 2772 | | const simple_string_o = addObject(b, opts, .{ .name = "simple_string", .cpp_source_bytes = |
| 2772 | const simple_string_o = addObject(b, opts, .{ .name = "simple_string", .cpp_source_bytes = |
| 2773 | 2773 | \\#include "all.h" |
| 2774 | 2774 | \\#include <cstdio> |
| 2775 | 2775 | \\#include <cstring> |
| ... | ... | @@ -2804,7 +2804,7 @@ fn testUnwindInfo(b: *Build, opts: Options) *Step { |
| 2804 | 2804 | simple_string_o.root_module.addIncludePath(all_h.dirname()); |
| 2805 | 2805 | simple_string_o.root_module.link_libcpp = true; |
| 2806 | 2806 | |
| 2807 | | const simple_string_owner_o = addObject(b, opts, .{ .name = "simple_string_owner", .cpp_source_bytes = |
| 2807 | const simple_string_owner_o = addObject(b, opts, .{ .name = "simple_string_owner", .cpp_source_bytes = |
| 2808 | 2808 | \\#include "all.h" |
| 2809 | 2809 | \\ |
| 2810 | 2810 | \\SimpleStringOwner::SimpleStringOwner(const char* x) : string{ 10 } { |
| ... | ... | @@ -2851,7 +2851,7 @@ fn testUnwindInfo(b: *Build, opts: Options) *Step { |
| 2851 | 2851 | fn testUnwindInfoNoSubsectionsArm64(b: *Build, opts: Options) *Step { |
| 2852 | 2852 | const test_step = addTestStep(b, "unwind-info-no-subsections-arm64", opts); |
| 2853 | 2853 | |
| 2854 | | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 2854 | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 2855 | 2855 | \\.globl _foo |
| 2856 | 2856 | \\.align 4 |
| 2857 | 2857 | \\_foo: |
| ... | ... | @@ -2891,7 +2891,7 @@ fn testUnwindInfoNoSubsectionsArm64(b: *Build, opts: Options) *Step { |
| 2891 | 2891 | \\ .cfi_endproc |
| 2892 | 2892 | }); |
| 2893 | 2893 | |
| 2894 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2894 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2895 | 2895 | \\#include <stdio.h> |
| 2896 | 2896 | \\int foo(); |
| 2897 | 2897 | \\int main() { |
| ... | ... | @@ -2911,7 +2911,7 @@ fn testUnwindInfoNoSubsectionsArm64(b: *Build, opts: Options) *Step { |
| 2911 | 2911 | fn testUnwindInfoNoSubsectionsX64(b: *Build, opts: Options) *Step { |
| 2912 | 2912 | const test_step = addTestStep(b, "unwind-info-no-subsections-x64", opts); |
| 2913 | 2913 | |
| 2914 | | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 2914 | const a_o = addObject(b, opts, .{ .name = "a", .asm_source_bytes = |
| 2915 | 2915 | \\.globl _foo |
| 2916 | 2916 | \\_foo: |
| 2917 | 2917 | \\ .cfi_startproc |
| ... | ... | @@ -2943,7 +2943,7 @@ fn testUnwindInfoNoSubsectionsX64(b: *Build, opts: Options) *Step { |
| 2943 | 2943 | \\ .cfi_endproc |
| 2944 | 2944 | }); |
| 2945 | 2945 | |
| 2946 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2946 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 2947 | 2947 | \\#include <stdio.h> |
| 2948 | 2948 | \\int foo(); |
| 2949 | 2949 | \\int main() { |
| ... | ... | @@ -2964,7 +2964,7 @@ fn testUnwindInfoNoSubsectionsX64(b: *Build, opts: Options) *Step { |
| 2964 | 2964 | fn testWeakBind(b: *Build, opts: Options) *Step { |
| 2965 | 2965 | const test_step = addTestStep(b, "weak-bind", opts); |
| 2966 | 2966 | |
| 2967 | | const lib = addSharedLibrary(b, opts, .{ .name = "foo", .asm_source_bytes = |
| 2967 | const lib = addSharedLibrary(b, opts, .{ .name = "foo", .asm_source_bytes = |
| 2968 | 2968 | \\.globl _weak_dysym |
| 2969 | 2969 | \\.weak_definition _weak_dysym |
| 2970 | 2970 | \\_weak_dysym: |
| ... | ... | @@ -2998,7 +2998,7 @@ fn testWeakBind(b: *Build, opts: Options) *Step { |
| 2998 | 2998 | test_step.dependOn(&check.step); |
| 2999 | 2999 | } |
| 3000 | 3000 | |
| 3001 | | const exe = addExecutable(b, opts, .{ .name = "main", .asm_source_bytes = |
| 3001 | const exe = addExecutable(b, opts, .{ .name = "main", .asm_source_bytes = |
| 3002 | 3002 | \\.globl _main, _weak_external, _weak_external_for_gotpcrel, _weak_external_fn |
| 3003 | 3003 | \\.weak_definition _weak_external, _weak_external_for_gotpcrel, _weak_external_fn, _weak_internal, _weak_internal_for_gotpcrel, _weak_internal_fn |
| 3004 | 3004 | \\ |
| ... | ... | @@ -3114,7 +3114,7 @@ fn testWeakFramework(b: *Build, opts: Options) *Step { |
| 3114 | 3114 | fn testWeakLibrary(b: *Build, opts: Options) *Step { |
| 3115 | 3115 | const test_step = addTestStep(b, "weak-library", opts); |
| 3116 | 3116 | |
| 3117 | | const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = |
| 3117 | const dylib = addSharedLibrary(b, opts, .{ .name = "a", .c_source_bytes = |
| 3118 | 3118 | \\#include<stdio.h> |
| 3119 | 3119 | \\int a = 42; |
| 3120 | 3120 | \\const char* asStr() { |
| ... | ... | @@ -3124,7 +3124,7 @@ fn testWeakLibrary(b: *Build, opts: Options) *Step { |
| 3124 | 3124 | \\} |
| 3125 | 3125 | }); |
| 3126 | 3126 | |
| 3127 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 3127 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 3128 | 3128 | \\#include<stdio.h> |
| 3129 | 3129 | \\extern int a; |
| 3130 | 3130 | \\extern const char* asStr(); |
| ... | ... | @@ -3157,7 +3157,7 @@ fn testWeakLibrary(b: *Build, opts: Options) *Step { |
| 3157 | 3157 | fn testWeakRef(b: *Build, opts: Options) *Step { |
| 3158 | 3158 | const test_step = addTestStep(b, "weak-ref", opts); |
| 3159 | 3159 | |
| 3160 | | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 3160 | const exe = addExecutable(b, opts, .{ .name = "main", .c_source_bytes = |
| 3161 | 3161 | \\#include <stdio.h> |
| 3162 | 3162 | \\#include <sys/_types/_fd_def.h> |
| 3163 | 3163 | \\int main(int argc, char** argv) { |