Added Functions
This commit is contained in:
parent
dc8dd2a8a8
commit
3d368666be
|
@ -0,0 +1,34 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
// for restricting supported target set are available.
|
||||
const target = b.standardTargetOptions(.{});
|
||||
|
||||
// Standard release options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
const mode = b.standardReleaseOptions();
|
||||
|
||||
const exe = b.addExecutable("Functions", "src/main.zig");
|
||||
exe.setTarget(target);
|
||||
exe.setBuildMode(mode);
|
||||
exe.install();
|
||||
|
||||
const run_cmd = exe.run();
|
||||
run_cmd.step.dependOn(b.getInstallStep());
|
||||
if (b.args) |args| {
|
||||
run_cmd.addArgs(args);
|
||||
}
|
||||
|
||||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
const exe_tests = b.addTest("src/main.zig");
|
||||
exe_tests.setTarget(target);
|
||||
exe_tests.setBuildMode(mode);
|
||||
|
||||
const test_step = b.step("test", "Run unit tests");
|
||||
test_step.dependOn(&exe_tests.step);
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
const std = @import("std");
|
||||
const info = std.log.info;
|
||||
|
||||
// Functions
|
||||
fn add(a: i32, b: i32) i32 {
|
||||
var result = a + b;
|
||||
return result;
|
||||
}
|
||||
fn printname(name: []const u8) void {
|
||||
info("{s}", .{name});
|
||||
}
|
||||
// * Naming rules
|
||||
// * Statements
|
||||
// * Return types
|
||||
pub fn main() !void {
|
||||
var res = add(3, 1);
|
||||
info("Adding 3 + 1 = {}", .{res});
|
||||
printname("Eduardo");
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
377 39922 1675436897169160067 8768c2fb74c1a349d050523f17d7cb0a 0 src/main.zig
|
||||
377 39922 1675436897169160067 8768c2fb74c1a349d050523f17d7cb0a 0 src/main.zig
|
||||
7412 588795 1675257302000000000 6e97101682da244b0f85133180189518 1 std/std.zig
|
||||
7412 588795 1675257302000000000 6e97101682da244b0f85133180189518 1 std/std.zig
|
||||
24310 588793 1675257302000000000 1e46d43bd20d0e4529bd4d5a601b2b63 1 std/start.zig
|
||||
377 39922 1675436897169160067 8768c2fb74c1a349d050523f17d7cb0a 0 src/main.zig
|
||||
34690 588313 1675257302000000000 2e0dd782469db1ebcced7a1d42d81f31 1 std/builtin.zig
|
||||
2236 829399 1675435429120340505 089e0d6a454908928dac587f8ec5e3ac 2 o/0ac5d6877b1476490c308a12c235b570/builtin.zig
|
||||
65773 588820 1675257302000000000 b40e5244dd69dedfbc6ef34e379a604e 1 std/target.zig
|
||||
68938 588798 1675257302000000000 58947a95cad065925f1d16279596ff4a 1 std/target/aarch64.zig
|
||||
70485 588631 1675257302000000000 4ea5cb6ebbebddbe19496521999f4dbc 1 std/math.zig
|
||||
38404 588638 1675257302000000000 3e4e305c969e7504f5da2811805fc14f 1 std/meta.zig
|
||||
85928 588449 1675257302000000000 c00ae24b16b9b2110a2088916ba523e5 1 std/debug.zig
|
||||
44959 588459 1675257302000000000 8ba8fd8c215453b6fe98901828e37c71 1 std/elf.zig
|
||||
280896 588770 1675257302000000000 6a5cad5b1b3bf6549848b458fa7d31a5 1 std/os.zig
|
||||
164478 588689 1675257302000000000 9cce12dfad5073871d1a79734bfdfd30 1 std/os/linux.zig
|
||||
122606 588666 1675257302000000000 d66439f24c9dac70d65e435c80848e59 1 std/os/linux/io_uring.zig
|
||||
12222 588684 1675257302000000000 b393f4b1f58b936b718a00a67fe23655 1 std/os/linux/tls.zig
|
||||
932 588475 1675257302000000000 b4c3b5276113dacf836baae9d9f94c34 1 std/event.zig
|
||||
69064 588470 1675257302000000000 59689871cfa16b4c27b801dc8c5e7aa2 1 std/event/loop.zig
|
||||
7267 588557 1675257302000000000 45506a1ee78623353960cb1015342e64 1 std/io.zig
|
||||
8464 588564 1675257302000000000 eb6f305555742af0db58660277a95c7c 1 std/log.zig
|
||||
107397 588496 1675257302000000000 434aa7450f224bcb0f46e510b00dedc1 1 std/fmt.zig
|
||||
153067 588634 1675257302000000000 53bcbef21b92558b1f61d8c2c4eecee6 1 std/mem.zig
|
||||
5431 588289 1675257302000000000 ea31b0f79f811fc3d89147eab9ce3c66 1 std/atomic.zig
|
||||
25734 588286 1675257302000000000 c83b5f5356902e712d9049eeb00cf434 1 std/atomic/Atomic.zig
|
||||
18522 588637 1675257302000000000 a684cfd7cd1229e252c4787464864c37 1 std/meta/trait.zig
|
||||
42236 588280 1675257302000000000 0414c0fe475ea687bb9f2088f986d594 1 std/Thread.zig
|
||||
10418 588276 1675257302000000000 48fe788323fe30a209ddbe76fa6a774e 1 std/Thread/Mutex.zig
|
||||
139065 588504 1675257302000000000 fdd8f734a09cb7a14729558b46f84383 1 std/fs.zig
|
||||
63527 588498 1675257302000000000 91f957eb7387392b6b9a2e8c701e9b97 1 std/fs/file.zig
|
||||
3400 588556 1675257302000000000 5d1d518c32f4fd700943417f56120125 1 std/io/writer.zig
|
||||
41488 588275 1675257302000000000 d6ad4a61b0531df1f888b48013d0a9d5 1 std/Thread/Futex.zig
|
||||
7297 588650 1675257302000000000 1b79eccf03ac44c7fc4c1fc825bd4890 1 std/os/linux/arm64.zig
|
||||
6690 588548 1675257302000000000 f7ae1b637c0ed925a9717ecb70fd533c 1 std/io/fixed_buffer_stream.zig
|
||||
12864 588633 1675257302000000000 15efa01ea1d6604770d3c18f21e6a488 1 std/mem/Allocator.zig
|
||||
87249 588520 1675257302000000000 c0dfdb79c5c44f8e5bfa951b0b052663 1 std/hash_map.zig
|
||||
54934 588457 1675257302000000000 bd0bc52b5767b17a284eeee1aad53cff 1 std/dwarf.zig
|
||||
66225 588283 1675257302000000000 397ccdcd38c01f2a1ad6e2748b7d57a5 1 std/array_list.zig
|
||||
30503 588533 1675257302000000000 1e7102d10b5856376141eaf0b5d49473 1 std/heap.zig
|
||||
11940 588525 1675257302000000000 0114311dc0bdbab4331f6c592486d84b 1 std/heap/arena_allocator.zig
|
||||
13381 588563 1675257302000000000 8c3b58c71fcc2c5a4e90ccd59fa46dac 1 std/linked_list.zig
|
||||
28905 588552 1675257302000000000 7c046d86c70a8208c40e35daf10ff0dd 1 std/io/reader.zig
|
||||
1117 588553 1675257302000000000 3f2f071b498497f7d54bcfc458d51f5e 1 std/io/seekable_stream.zig
|
||||
15550 588562 1675257302000000000 e5c2b455a829477483226a467a1be9bf 1 std/leb128.zig
|
||||
1399 588453 1675257302000000000 39287cc8a2a858bc3b39edecab481aff 1 std/dwarf/FORM.zig
|
||||
3848 588456 1675257302000000000 673136e55905f01155e9463de5e36e7e 1 std/dwarf/TAG.zig
|
||||
7395 588451 1675257302000000000 fe0e04bcd58863e97993f2137b09a3ca 1 std/dwarf/AT.zig
|
||||
49522 588500 1675257302000000000 ea8b30309ecabc616e79be2367564d86 1 std/fs/path.zig
|
||||
7889 588660 1675257302000000000 562fc4eee397a5037d16dffd5e048cd4 1 std/os/linux/errno/generic.zig
|
||||
76224 588680 1675257302000000000 ca59103a7513d3d79874785a983b85e4 1 std/os/linux/syscalls.zig
|
||||
33948 588832 1675257302000000000 ef29e4d2233289a6dcb4b20ef33eb66c 1 std/unicode.zig
|
||||
3721 588522 1675257302000000000 f2d877cb352cfd121aace5c43b4d7bef 1 std/heap/PageAllocator.zig
|
||||
42592 588776 1675257302000000000 971516e8a167d214d9bba723198eb76b 1 std/process.zig
|
||||
14268 588458 1675257302000000000 20cae8d78a5642db14122f8d79b0edff 1 std/dynamic_library.zig
|
||||
1886 588621 1675257302000000000 881cf3f959ee1f34501bd4404819dc44 1 std/math/log2.zig
|
||||
12925 588826 1675257302000000000 ebe1d33668d70bc4a016755acf848454 1 std/time.zig
|
||||
1174 588519 1675257302000000000 1a71f479a0d0d95f1b0d960381e246ee 1 std/hash.zig
|
||||
10071 588518 1675257302000000000 b5b41a9c6a4b62e4383f6e3475be7143 1 std/hash/wyhash.zig
|
|
@ -0,0 +1,109 @@
|
|||
16666 573620 1675257302000000000 4fd76621e39776f736d5537ad8760bfd 1 build_runner.zig
|
||||
1189 669866 1675435192198994760 61aed75e1f35796fb0feafc13217db57 0 /home/eduardo/Documents/Programming/Zig/Learning-Zig/Functions/build.zig
|
||||
67 665114 1675435423289356683 8ab97a88820a6a61c1e8bf72730ee19d 2 o/e8f1b44878b69d5380ccabeefd1f2edd/dependencies.zig
|
||||
16666 573620 1675257302000000000 4fd76621e39776f736d5537ad8760bfd 1 build_runner.zig
|
||||
7412 588795 1675257302000000000 6e97101682da244b0f85133180189518 1 std/std.zig
|
||||
7412 588795 1675257302000000000 6e97101682da244b0f85133180189518 1 std/std.zig
|
||||
24310 588793 1675257302000000000 1e46d43bd20d0e4529bd4d5a601b2b63 1 std/start.zig
|
||||
16666 573620 1675257302000000000 4fd76621e39776f736d5537ad8760bfd 1 build_runner.zig
|
||||
34690 588313 1675257302000000000 2e0dd782469db1ebcced7a1d42d81f31 1 std/builtin.zig
|
||||
2236 0 0 089e0d6a454908928dac587f8ec5e3ac 2 o/df8fac70c701009ce4c60a7745afb98a/builtin.zig
|
||||
65773 588820 1675257302000000000 b40e5244dd69dedfbc6ef34e379a604e 1 std/target.zig
|
||||
68938 588798 1675257302000000000 58947a95cad065925f1d16279596ff4a 1 std/target/aarch64.zig
|
||||
70485 588631 1675257302000000000 4ea5cb6ebbebddbe19496521999f4dbc 1 std/math.zig
|
||||
38404 588638 1675257302000000000 3e4e305c969e7504f5da2811805fc14f 1 std/meta.zig
|
||||
85928 588449 1675257302000000000 c00ae24b16b9b2110a2088916ba523e5 1 std/debug.zig
|
||||
44959 588459 1675257302000000000 8ba8fd8c215453b6fe98901828e37c71 1 std/elf.zig
|
||||
280896 588770 1675257302000000000 6a5cad5b1b3bf6549848b458fa7d31a5 1 std/os.zig
|
||||
164478 588689 1675257302000000000 9cce12dfad5073871d1a79734bfdfd30 1 std/os/linux.zig
|
||||
122606 588666 1675257302000000000 d66439f24c9dac70d65e435c80848e59 1 std/os/linux/io_uring.zig
|
||||
12222 588684 1675257302000000000 b393f4b1f58b936b718a00a67fe23655 1 std/os/linux/tls.zig
|
||||
932 588475 1675257302000000000 b4c3b5276113dacf836baae9d9f94c34 1 std/event.zig
|
||||
69064 588470 1675257302000000000 59689871cfa16b4c27b801dc8c5e7aa2 1 std/event/loop.zig
|
||||
7267 588557 1675257302000000000 45506a1ee78623353960cb1015342e64 1 std/io.zig
|
||||
30503 588533 1675257302000000000 1e7102d10b5856376141eaf0b5d49473 1 std/heap.zig
|
||||
11940 588525 1675257302000000000 0114311dc0bdbab4331f6c592486d84b 1 std/heap/arena_allocator.zig
|
||||
153067 588634 1675257302000000000 53bcbef21b92558b1f61d8c2c4eecee6 1 std/mem.zig
|
||||
12864 588633 1675257302000000000 15efa01ea1d6604770d3c18f21e6a488 1 std/mem/Allocator.zig
|
||||
13381 588563 1675257302000000000 8c3b58c71fcc2c5a4e90ccd59fa46dac 1 std/linked_list.zig
|
||||
3721 588522 1675257302000000000 f2d877cb352cfd121aace5c43b4d7bef 1 std/heap/PageAllocator.zig
|
||||
42592 588776 1675257302000000000 971516e8a167d214d9bba723198eb76b 1 std/process.zig
|
||||
66225 588283 1675257302000000000 397ccdcd38c01f2a1ad6e2748b7d57a5 1 std/array_list.zig
|
||||
18522 588637 1675257302000000000 a684cfd7cd1229e252c4787464864c37 1 std/meta/trait.zig
|
||||
67430 588312 1675257302000000000 bb4590f2ef3f594d9e3a6796203359ed 1 std/build.zig
|
||||
87249 588520 1675257302000000000 c0dfdb79c5c44f8e5bfa951b0b052663 1 std/hash_map.zig
|
||||
7713 588864 1675257302000000000 f2829e3c5d26d3b822b08ecbc03a8a26 1 std/zig.zig
|
||||
382 588861 1675257302000000000 72d1274335940791012004d8be36418f 1 std/zig/system.zig
|
||||
49423 588853 1675257302000000000 f7dec4ecdc28d3aaf76efd6bf4a4d5bd 1 std/zig/system/NativeTargetInfo.zig
|
||||
29867 588840 1675257302000000000 9affe06e18bfbf7c926ba4819e06c356 1 std/zig/CrossTarget.zig
|
||||
139065 588504 1675257302000000000 fdd8f734a09cb7a14729558b46f84383 1 std/fs.zig
|
||||
49522 588500 1675257302000000000 ea8b30309ecabc616e79be2367564d86 1 std/fs/path.zig
|
||||
63527 588498 1675257302000000000 91f957eb7387392b6b9a2e8c701e9b97 1 std/fs/file.zig
|
||||
3400 588556 1675257302000000000 5d1d518c32f4fd700943417f56120125 1 std/io/writer.zig
|
||||
8464 588564 1675257302000000000 eb6f305555742af0db58660277a95c7c 1 std/log.zig
|
||||
107397 588496 1675257302000000000 434aa7450f224bcb0f46e510b00dedc1 1 std/fmt.zig
|
||||
1189 669866 1675435192198994760 61aed75e1f35796fb0feafc13217db57 0 /home/eduardo/Documents/Programming/Zig/Learning-Zig/Functions/build.zig
|
||||
5431 588289 1675257302000000000 ea31b0f79f811fc3d89147eab9ce3c66 1 std/atomic.zig
|
||||
25734 588286 1675257302000000000 c83b5f5356902e712d9049eeb00cf434 1 std/atomic/Atomic.zig
|
||||
42236 588280 1675257302000000000 0414c0fe475ea687bb9f2088f986d594 1 std/Thread.zig
|
||||
10418 588276 1675257302000000000 48fe788323fe30a209ddbe76fa6a774e 1 std/Thread/Mutex.zig
|
||||
41488 588275 1675257302000000000 d6ad4a61b0531df1f888b48013d0a9d5 1 std/Thread/Futex.zig
|
||||
7297 588650 1675257302000000000 1b79eccf03ac44c7fc4c1fc825bd4890 1 std/os/linux/arm64.zig
|
||||
14627 588284 1675257302000000000 d008f2d8caa722f5ecc8db15f5cf94b7 1 std/ascii.zig
|
||||
94381 588818 1675257302000000000 5f886a9805ef023f73bb57a01019d121 1 std/target/x86.zig
|
||||
72827 588802 1675257302000000000 031f438680f7749b7c34e974767cc73a 1 std/target/arm.zig
|
||||
7889 588660 1675257302000000000 562fc4eee397a5037d16dffd5e048cd4 1 std/os/linux/errno/generic.zig
|
||||
1886 588621 1675257302000000000 881cf3f959ee1f34501bd4404819dc44 1 std/math/log2.zig
|
||||
5051 588363 1675257302000000000 e11e6511436aad04d68dc394ef9480dd 1 std/comptime_string_map.zig
|
||||
65527 588792 1675257302000000000 945f25643ae4cfda0e1cfd3b91137164 1 std/sort.zig
|
||||
54934 588457 1675257302000000000 bd0bc52b5767b17a284eeee1aad53cff 1 std/dwarf.zig
|
||||
6690 588548 1675257302000000000 f7ae1b637c0ed925a9717ecb70fd533c 1 std/io/fixed_buffer_stream.zig
|
||||
28905 588552 1675257302000000000 7c046d86c70a8208c40e35daf10ff0dd 1 std/io/reader.zig
|
||||
1117 588553 1675257302000000000 3f2f071b498497f7d54bcfc458d51f5e 1 std/io/seekable_stream.zig
|
||||
15550 588562 1675257302000000000 e5c2b455a829477483226a467a1be9bf 1 std/leb128.zig
|
||||
1399 588453 1675257302000000000 39287cc8a2a858bc3b39edecab481aff 1 std/dwarf/FORM.zig
|
||||
3848 588456 1675257302000000000 673136e55905f01155e9463de5e36e7e 1 std/dwarf/TAG.zig
|
||||
7395 588451 1675257302000000000 fe0e04bcd58863e97993f2137b09a3ca 1 std/dwarf/AT.zig
|
||||
76224 588680 1675257302000000000 ca59103a7513d3d79874785a983b85e4 1 std/os/linux/syscalls.zig
|
||||
12582 588858 1675257302000000000 d6af8904217c0df263509688d80daab4 1 std/zig/system/linux.zig
|
||||
13634 588292 1675257302000000000 dd9d404bac7044a17afadd68a6d48237 1 std/bounded_array.zig
|
||||
79136 588305 1675257302000000000 2d54b3bf08631e911cdbdd2f9e340c8e 1 std/build/LibExeObjStep.zig
|
||||
3736 588301 1675257302000000000 83a7fbfcfaf9437b1b8f3063e1023c1c 1 std/build/InstallArtifactStep.zig
|
||||
9997 588298 1675257302000000000 09005b93e57a7025464dc7e49b75e8f9 1 std/build/ConfigHeaderStep.zig
|
||||
12409 588309 1675257302000000000 0359d9015177d1ccf243c6f66703c5a2 1 std/build/RunStep.zig
|
||||
65730 588334 1675257302000000000 b3f71b5961185ab42708822bf9d4ed9b 1 std/child_process.zig
|
||||
33948 588832 1675257302000000000 ef29e4d2233289a6dcb4b20ef33eb66c 1 std/unicode.zig
|
||||
1165 588546 1675257302000000000 50efc7c5e5e9520d97cc0b49c050f5d5 1 std/io/counting_writer.zig
|
||||
14268 588458 1675257302000000000 20cae8d78a5642db14122f8d79b0edff 1 std/dynamic_library.zig
|
||||
12925 588826 1675257302000000000 ebe1d33668d70bc4a016755acf848454 1 std/time.zig
|
||||
1174 588519 1675257302000000000 1a71f479a0d0d95f1b0d960381e246ee 1 std/hash.zig
|
||||
10071 588518 1675257302000000000 b5b41a9c6a4b62e4383f6e3475be7143 1 std/hash/wyhash.zig
|
||||
26683 588812 1675257302000000000 1bee16362e8c391794b4379d2032ad4f 1 std/target/riscv.zig
|
||||
10356 588810 1675257302000000000 cbd554fc123d41f70ae0dfb9b7933bf9 1 std/target/nvptx.zig
|
||||
13315 588814 1675257302000000000 a50b56e8c98285aaf633026174e1539e 1 std/target/sparc.zig
|
||||
69343 588803 1675257302000000000 1f2dca56114fef483c4917ce5e5e501f 1 std/target/avr.zig
|
||||
13624 588806 1675257302000000000 ddf530a5cb81c4ffba3d37607912482c 1 std/target/hexagon.zig
|
||||
2206 588809 1675257302000000000 d6e20554da84c48e207022e2229de621 1 std/target/msp430.zig
|
||||
63261 588799 1675257302000000000 88a902bbf4af8caac543ec4e9288e557 1 std/target/amdgpu.zig
|
||||
25573 588813 1675257302000000000 7e061c6dbc9aea0f4fdf3b00d3eeb620 1 std/target/s390x.zig
|
||||
1240 588816 1675257302000000000 9dff7d081463c1d9d077dd4e999d0a41 1 std/target/ve.zig
|
||||
2207 588804 1675257302000000000 2feddb7106266f9cae15eadf50a8c386 1 std/target/bpf.zig
|
||||
15956 588808 1675257302000000000 e9120c6b03e428de62fb36e722a44a64 1 std/target/mips.zig
|
||||
33808 588811 1675257302000000000 401679845c0e2c1e2b6f11c71945d407 1 std/target/powerpc.zig
|
||||
77180 588815 1675257302000000000 7d614d7e5dfd6b9838f81992975768fb 1 std/target/spirv.zig
|
||||
4203 588817 1675257302000000000 e16699f86ea306851234e94319278529 1 std/target/wasm.zig
|
||||
6592 588807 1675257302000000000 66d63d3052266111bcff3f8d56bbf123 1 std/target/m68k.zig
|
||||
13225 588854 1675257302000000000 16e5d545de453d1159719a7123a353a3 1 std/zig/system/arm.zig
|
||||
153014 588769 1675257302000000000 a4478422ad9d4e5a3d6af7bd96f482c6 1 std/os/windows.zig
|
||||
10958 588693 1675257302000000000 784bf710151ac948d41cb8595f82947f 1 std/os/posix_spawn.zig
|
||||
9086 588299 1675257302000000000 bd6e30abc169b506f4ad40b1185e0c49 1 std/build/EmulatableRunStep.zig
|
||||
10813 588447 1675257302000000000 bdb9da9b690add06ac8ab2b85fd5ccb1 1 std/crypto.zig
|
||||
34782 588436 1675257302000000000 c8cb22e2058390634fb7bfb2f51006d9 1 std/crypto/sha2.zig
|
||||
17404 588290 1675257302000000000 d74d628559276ff34b2911f04377bc15 1 std/base64.zig
|
||||
6262 588440 1675257302000000000 fae02891eb892089e0f265fbd0f097c0 1 std/crypto/tlcsprng.zig
|
||||
20173 588789 1675257302000000000 2852865325c9e06db0ee31c5610cda26 1 std/rand.zig
|
||||
18617 588397 1675257302000000000 11c4c80f1aafeb1ebcfbcda136cad96c 1 std/crypto/gimli.zig
|
||||
19735 588476 1675257302000000000 6e7678248dfc65f416a8fd51dfa26c44 1 std/fifo.zig
|
||||
1546 588549 1675257302000000000 38fb78325e3512a8614b1c1d75ff158b 1 std/io/limited_reader.zig
|
||||
19466 588333 1675257302000000000 c577562d0150ced5cb78a8811900d01a 1 std/c.zig
|
||||
11849 588325 1675257302000000000 af7de09a6bec50e5b07b5ada6b731cc5 1 std/c/linux.zig
|
|
@ -0,0 +1,84 @@
|
|||
const std = @import("std");
|
||||
/// Zig version. When writing code that supports multiple versions of Zig, prefer
|
||||
/// feature detection (i.e. with `@hasDecl` or `@hasField`) over version checks.
|
||||
pub const zig_version = std.SemanticVersion.parse("0.11.0-dev.1507+6f13a725a") catch unreachable;
|
||||
pub const zig_backend = std.builtin.CompilerBackend.stage2_llvm;
|
||||
|
||||
pub const output_mode = std.builtin.OutputMode.Exe;
|
||||
pub const link_mode = std.builtin.LinkMode.Static;
|
||||
pub const is_test = false;
|
||||
pub const single_threaded = false;
|
||||
pub const abi = std.Target.Abi.gnu;
|
||||
pub const cpu: std.Target.Cpu = .{
|
||||
.arch = .aarch64,
|
||||
.model = &std.Target.aarch64.cpu.cortex_a76,
|
||||
.features = std.Target.aarch64.featureSet(&[_]std.Target.aarch64.Feature{
|
||||
.a76,
|
||||
.aes,
|
||||
.ccpp,
|
||||
.contextidr_el2,
|
||||
.crc,
|
||||
.crypto,
|
||||
.dotprod,
|
||||
.el2vmsa,
|
||||
.el3,
|
||||
.fp_armv8,
|
||||
.fullfp16,
|
||||
.fuse_aes,
|
||||
.lor,
|
||||
.lse,
|
||||
.neon,
|
||||
.pan,
|
||||
.pan_rwv,
|
||||
.perfmon,
|
||||
.ras,
|
||||
.rcpc,
|
||||
.rdm,
|
||||
.sha2,
|
||||
.ssbs,
|
||||
.uaops,
|
||||
.v8_1a,
|
||||
.v8_2a,
|
||||
.v8a,
|
||||
.vh,
|
||||
}),
|
||||
};
|
||||
pub const os = std.Target.Os{
|
||||
.tag = .linux,
|
||||
.version_range = .{ .linux = .{
|
||||
.range = .{
|
||||
.min = .{
|
||||
.major = 5,
|
||||
.minor = 18,
|
||||
.patch = 0,
|
||||
},
|
||||
.max = .{
|
||||
.major = 5,
|
||||
.minor = 18,
|
||||
.patch = 0,
|
||||
},
|
||||
},
|
||||
.glibc = .{
|
||||
.major = 2,
|
||||
.minor = 36,
|
||||
.patch = 0,
|
||||
},
|
||||
}},
|
||||
};
|
||||
pub const target = std.Target{
|
||||
.cpu = cpu,
|
||||
.os = os,
|
||||
.abi = abi,
|
||||
.ofmt = object_format,
|
||||
};
|
||||
pub const object_format = std.Target.ObjectFormat.elf;
|
||||
pub const mode = std.builtin.Mode.Debug;
|
||||
pub const link_libc = false;
|
||||
pub const link_libcpp = false;
|
||||
pub const have_error_return_tracing = true;
|
||||
pub const valgrind_support = true;
|
||||
pub const sanitize_thread = false;
|
||||
pub const position_independent_code = false;
|
||||
pub const position_independent_executable = false;
|
||||
pub const strip_debug_info = false;
|
||||
pub const code_model = std.builtin.CodeModel.default;
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,84 @@
|
|||
const std = @import("std");
|
||||
/// Zig version. When writing code that supports multiple versions of Zig, prefer
|
||||
/// feature detection (i.e. with `@hasDecl` or `@hasField`) over version checks.
|
||||
pub const zig_version = std.SemanticVersion.parse("0.11.0-dev.1507+6f13a725a") catch unreachable;
|
||||
pub const zig_backend = std.builtin.CompilerBackend.stage2_llvm;
|
||||
|
||||
pub const output_mode = std.builtin.OutputMode.Exe;
|
||||
pub const link_mode = std.builtin.LinkMode.Static;
|
||||
pub const is_test = false;
|
||||
pub const single_threaded = false;
|
||||
pub const abi = std.Target.Abi.gnu;
|
||||
pub const cpu: std.Target.Cpu = .{
|
||||
.arch = .aarch64,
|
||||
.model = &std.Target.aarch64.cpu.cortex_a76,
|
||||
.features = std.Target.aarch64.featureSet(&[_]std.Target.aarch64.Feature{
|
||||
.a76,
|
||||
.aes,
|
||||
.ccpp,
|
||||
.contextidr_el2,
|
||||
.crc,
|
||||
.crypto,
|
||||
.dotprod,
|
||||
.el2vmsa,
|
||||
.el3,
|
||||
.fp_armv8,
|
||||
.fullfp16,
|
||||
.fuse_aes,
|
||||
.lor,
|
||||
.lse,
|
||||
.neon,
|
||||
.pan,
|
||||
.pan_rwv,
|
||||
.perfmon,
|
||||
.ras,
|
||||
.rcpc,
|
||||
.rdm,
|
||||
.sha2,
|
||||
.ssbs,
|
||||
.uaops,
|
||||
.v8_1a,
|
||||
.v8_2a,
|
||||
.v8a,
|
||||
.vh,
|
||||
}),
|
||||
};
|
||||
pub const os = std.Target.Os{
|
||||
.tag = .linux,
|
||||
.version_range = .{ .linux = .{
|
||||
.range = .{
|
||||
.min = .{
|
||||
.major = 5,
|
||||
.minor = 18,
|
||||
.patch = 0,
|
||||
},
|
||||
.max = .{
|
||||
.major = 5,
|
||||
.minor = 18,
|
||||
.patch = 0,
|
||||
},
|
||||
},
|
||||
.glibc = .{
|
||||
.major = 2,
|
||||
.minor = 36,
|
||||
.patch = 0,
|
||||
},
|
||||
}},
|
||||
};
|
||||
pub const target = std.Target{
|
||||
.cpu = cpu,
|
||||
.os = os,
|
||||
.abi = abi,
|
||||
.ofmt = object_format,
|
||||
};
|
||||
pub const object_format = std.Target.ObjectFormat.elf;
|
||||
pub const mode = std.builtin.Mode.Debug;
|
||||
pub const link_libc = false;
|
||||
pub const link_libcpp = false;
|
||||
pub const have_error_return_tracing = true;
|
||||
pub const valgrind_support = true;
|
||||
pub const sanitize_thread = false;
|
||||
pub const position_independent_code = false;
|
||||
pub const position_independent_executable = false;
|
||||
pub const strip_debug_info = false;
|
||||
pub const code_model = std.builtin.CodeModel.default;
|
|
@ -0,0 +1,4 @@
|
|||
pub const imports = struct {
|
||||
};
|
||||
pub const build_root = struct {
|
||||
};
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue