Commit 142471f
committed
zig build system: change target, compilation, and module APIs
Introduce the concept of "target query" and "resolved target". A target
query is what the user specifies, with some things left to default. A
resolved target has the default things discovered and populated.
In the future, std.zig.CrossTarget will be rename to std.Target.Query.
Introduces `std.Build.resolveTargetQuery` to get from one to the other.
The concept of `main_mod_path` is gone, no longer supported. You have to
put the root source file at the module root now.
* remove deprecated API
* update build.zig for the breaking API changes in this branch
* move std.Build.Step.Compile.BuildId to std.zig.BuildId
* add more options to std.Build.ExecutableOptions, std.Build.ObjectOptions,
std.Build.SharedLibraryOptions, std.Build.StaticLibraryOptions, and
std.Build.TestOptions.
* remove `std.Build.constructCMacro`. There is no use for this API.
* deprecate `std.Build.Step.Compile.defineCMacro`. Instead,
`std.Build.Module.addCMacro` is provided.
- remove `std.Build.Step.Compile.defineCMacroRaw`.
* deprecate `std.Build.Step.Compile.linkFrameworkNeeded`
- use `std.Build.Module.linkFramework`
* deprecate `std.Build.Step.Compile.linkFrameworkWeak`
- use `std.Build.Module.linkFramework`
* move more logic into `std.Build.Module`
* allow `target` and `optimize` to be `null` when creating a Module.
Along with other fields, those unspecified options will be inherited
from parent `Module` when inserted into an import table.
* the `target` field of `addExecutable` is now required. pass `b.host`
to get the host target.1 parent 579f572 commit 142471f
File tree
122 files changed
+1812
-1338
lines changed- deps/aro/build
- lib
- std
- Build
- Step
- zig
- system
- src
- test
- behavior
- link
- bss
- common_symbols_alignment
- common_symbols
- glibc_compat
- interdependent_static_c_libs
- macho
- bugs
- 13056
- 13457
- 16308
- 16628
- dead_strip_dylibs
- dead_strip
- dylib
- empty
- entry_in_archive
- entry_in_dylib
- entry
- headerpad
- linksection
- needed_framework
- needed_library
- objcpp
- objc
- pagezero
- reexports
- search_strategy
- stack_size
- strict_validation
- tbdv3
- tls
- unwind_info
- weak_framework
- weak_library
- static_libs_from_object_files
- wasm
- archive
- basic-features
- bss
- export-data
- export
- extern-mangle
- extern
- function-table
- infer-features
- producers
- segments
- stack_pointer
- type
- src
- standalone
- c_compiler
- child_process
- compiler_rt_panic
- dep_diamond
- dep_mutually_recursive
- dep_recursive
- dep_triangle
- embed_generated_file
- empty_env
- extern
- global_linkage
- install_raw_hex
- ios
- issue_11595
- issue_12588
- issue_12706
- issue_339
- issue_8550
- load_dynamic_library
- main_pkg_path
- a
- mix_c_files
- mix_o_files
- options
- pie
- pkg_import
- self_exe_symlink
- stack_iterator
- static_c_lib
- strip_empty_loop
- strip_struct_init
- test_runner_module_imports
- windows_resources
- windows_spawn
- zerolength_check
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
122 files changed
+1812
-1338
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | | - | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | | - | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
199 | 204 | | |
200 | | - | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
204 | | - | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
| |||
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
220 | | - | |
221 | | - | |
222 | | - | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
233 | | - | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
345 | 347 | | |
346 | 348 | | |
347 | 349 | | |
348 | | - | |
| 350 | + | |
349 | 351 | | |
350 | 352 | | |
351 | 353 | | |
| |||
369 | 371 | | |
370 | 372 | | |
371 | 373 | | |
372 | | - | |
| 374 | + | |
373 | 375 | | |
374 | 376 | | |
375 | 377 | | |
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
379 | 381 | | |
380 | | - | |
| 382 | + | |
381 | 383 | | |
382 | 384 | | |
383 | 385 | | |
384 | | - | |
| 386 | + | |
385 | 387 | | |
386 | 388 | | |
387 | 389 | | |
| |||
390 | 392 | | |
391 | 393 | | |
392 | 394 | | |
393 | | - | |
| 395 | + | |
394 | 396 | | |
395 | 397 | | |
396 | 398 | | |
| |||
540 | 542 | | |
541 | 543 | | |
542 | 544 | | |
543 | | - | |
| 545 | + | |
544 | 546 | | |
545 | 547 | | |
546 | 548 | | |
547 | | - | |
| 549 | + | |
548 | 550 | | |
549 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
550 | 555 | | |
551 | 556 | | |
552 | | - | |
| 557 | + | |
553 | 558 | | |
554 | 559 | | |
555 | 560 | | |
| |||
584 | 589 | | |
585 | 590 | | |
586 | 591 | | |
587 | | - | |
588 | | - | |
| 592 | + | |
589 | 593 | | |
590 | | - | |
591 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
592 | 601 | | |
593 | 602 | | |
594 | 603 | | |
595 | | - | |
596 | | - | |
| 604 | + | |
| 605 | + | |
597 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
598 | 610 | | |
599 | 611 | | |
600 | 612 | | |
601 | 613 | | |
602 | 614 | | |
603 | 615 | | |
604 | 616 | | |
605 | | - | |
606 | | - | |
| 617 | + | |
| 618 | + | |
607 | 619 | | |
608 | 620 | | |
609 | 621 | | |
610 | 622 | | |
611 | 623 | | |
612 | | - | |
613 | | - | |
| 624 | + | |
| 625 | + | |
614 | 626 | | |
615 | 627 | | |
616 | 628 | | |
| |||
625 | 637 | | |
626 | 638 | | |
627 | 639 | | |
628 | | - | |
| 640 | + | |
629 | 641 | | |
630 | 642 | | |
631 | 643 | | |
| |||
649 | 661 | | |
650 | 662 | | |
651 | 663 | | |
652 | | - | |
| 664 | + | |
653 | 665 | | |
654 | 666 | | |
655 | 667 | | |
| |||
677 | 689 | | |
678 | 690 | | |
679 | 691 | | |
680 | | - | |
681 | | - | |
| 692 | + | |
| 693 | + | |
682 | 694 | | |
683 | 695 | | |
684 | 696 | | |
| |||
694 | 706 | | |
695 | 707 | | |
696 | 708 | | |
697 | | - | |
| 709 | + | |
698 | 710 | | |
699 | 711 | | |
700 | 712 | | |
| |||
756 | 768 | | |
757 | 769 | | |
758 | 770 | | |
759 | | - | |
| 771 | + | |
760 | 772 | | |
761 | 773 | | |
762 | 774 | | |
763 | 775 | | |
764 | | - | |
| 776 | + | |
765 | 777 | | |
766 | 778 | | |
767 | 779 | | |
| |||
810 | 822 | | |
811 | 823 | | |
812 | 824 | | |
813 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
814 | 828 | | |
815 | 829 | | |
816 | 830 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
0 commit comments