Commit Graph

27322 Commits

Author SHA1 Message Date
Andrew Kelley 8cf2cfc52c update bootstrap scripts to new zig CLI
Now they use the new --mod --dep parameters.
2024-01-01 17:51:21 -07:00
Andrew Kelley 24eec48f60 CLI: update main usage text
* Organize and reword some stuff
* Add missing usage for `zig reduce`
2024-01-01 17:51:21 -07:00
Andrew Kelley 9141e1a29c CLI: fix logic for sending output file path
via the compiler protocol
2024-01-01 17:51:21 -07:00
Andrew Kelley e12e296306 CLI: fix not respecting module remappings 2024-01-01 17:51:21 -07:00
Andrew Kelley 3262e9ccee zig build: fix logic for extracting executable file from Compilation 2024-01-01 17:51:21 -07:00
Andrew Kelley 3b36c4d0b3 zig build: pass resolved_target to Module.create
it's now required to pass this for the root module
2024-01-01 17:51:21 -07:00
Andrew Kelley 056f04c1ff CLI: rename clang_argv to cc_argv
The args apply to Aro as well.
2024-01-01 17:51:21 -07:00
Andrew Kelley fad35835aa CLI: better error messages for bad args 2024-01-01 17:51:20 -07:00
Andrew Kelley 76c4781578 std.Build.Step.Options: update unit test to new API 2024-01-01 17:51:20 -07:00
Andrew Kelley 529d01c2ba resolve error tracing logic at module creation time
rather than checking multiple conditions in Sema
2024-01-01 17:51:20 -07:00
Andrew Kelley 8944dea23f CLI: fix regressed logic for any_dyn_libs
This value needs access to the fully resolved set of system libraries,
which required restructuring a bunch of CLI logic.
2024-01-01 17:51:20 -07:00
Andrew Kelley db2ca2ca00 CLI: mark any_dyn_libs=true when encountering a shared object 2024-01-01 17:51:20 -07:00
Andrew Kelley ca77c3bacc std.Build.Step.Compile: restore previous step name
Print using the target query rather than the resolved target. This makes
it print "native" when compiling for the native target.
2024-01-01 17:51:20 -07:00
Andrew Kelley 4b667e7362 fix compilations without zig compilation units 2024-01-01 17:51:20 -07:00
Andrew Kelley fe87bae7e3 frontend: fix handling of special builtin module
it's allocated differently and imported differently
2024-01-01 17:51:20 -07:00
Andrew Kelley 90cc408c14 fix --show-builtin when no positional argument is provided 2024-01-01 17:51:20 -07:00
Andrew Kelley 38f2172b0a fix memory leak in addModuleTableToCacheHash 2024-01-01 17:51:20 -07:00
Andrew Kelley a3ff4d9b45 fix entry symbol name on mips 2024-01-01 17:51:20 -07:00
Andrew Kelley 2d2a18831e linker: rename intermediary_basname to zcu_object_sub_path 2024-01-01 17:51:20 -07:00
Andrew Kelley 9b98d33d0b Compilation: don't store arena until it's done being used 2024-01-01 17:51:20 -07:00
Andrew Kelley f256431838 fix compilation errors when enabling llvm 2024-01-01 17:51:20 -07:00
Andrew Kelley 57afdfc8fa compilation: fix build artifact communication from sub-compilation
in whole cache mode, build artifacts are communicated by accessing the
whole cache information, for which there is a helper method called
toCrtFile
2024-01-01 17:51:20 -07:00
Andrew Kelley b1fc3fe1c4 Elf: fix invalid free of path field
It's now arena-allocated so no need to free it with gpa
2024-01-01 17:51:20 -07:00
Andrew Kelley e3409c0bce Elf: fix createEmpty not creating the file 2024-01-01 17:51:20 -07:00
Andrew Kelley 0be97b5ae3 fix population of builtin.zig not making the parent dir 2024-01-01 17:51:20 -07:00
Andrew Kelley d71e6273b6 std.fs.Dir.atomicFile: provide an option for make path
It's useful for the API to support creating the parent directory.
2024-01-01 17:51:20 -07:00
Andrew Kelley 9715936472 Compilation: oops! used comp before init 2024-01-01 17:51:20 -07:00
Andrew Kelley b6dd5ad357 MachO: rip out the caching mechanism
This is redundant with CacheMode.whole which caches everything,
including linking output. Linker code does not need to concern itself
with caching like this.
2024-01-01 17:51:20 -07:00
Andrew Kelley 2047a6b82d fix remaining compile errors except one 2024-01-01 17:51:20 -07:00
Andrew Kelley 4629708787 linker: fix some allocator references 2024-01-01 17:51:20 -07:00
Andrew Kelley 48d5861f92 fix more compilation errors introduced by this branch 2024-01-01 17:51:20 -07:00
Andrew Kelley 638db680f4 move dll_export_fns and rdynamic to Compilation.Config 2024-01-01 17:51:20 -07:00
Andrew Kelley b54ad93175 update codegen.llvm references to bin_file.options 2024-01-01 17:51:19 -07:00
Andrew Kelley 92b54e50c8 glibc: update to new Compilation API 2024-01-01 17:51:19 -07:00
Andrew Kelley ea0ba4f2b5 tsan: update to new Compilation API 2024-01-01 17:51:19 -07:00
Andrew Kelley a1236b32f9 libcxx: update to new Compilation API 2024-01-01 17:51:19 -07:00
Andrew Kelley 2596f5d925 update bin_file.options references in Sema
mainly pertaining to error return tracing
2024-01-01 17:51:19 -07:00
Andrew Kelley 7e7d5dc958 musl: update references to bin_file.options 2024-01-01 17:51:19 -07:00
Andrew Kelley 6b44bddf5d linker: remove bad NvPtx flushModule implementation
it's not supposed to mutate Compilation like this.
2024-01-01 17:51:19 -07:00
Andrew Kelley c49957dbe8 fix a round of compile errors caused by this branch 2024-01-01 17:51:19 -07:00
Andrew Kelley f54471b54c compiler: miscellaneous branch progress
implement builtin.zig file population for all modules rather than
assuming there is only one global builtin.zig module.

move some fields from link.File to Compilation
move some fields from Module to Compilation

compute debug_format in global Compilation config resolution

wire up C compilation to the concept of owner modules

make whole cache mode call link.File.createEmpty() instead of
link.File.open()
2024-01-01 17:51:19 -07:00
Andrew Kelley 769dea6e37 Compilation: redo whole vs incremental logic in create and update 2024-01-01 17:51:19 -07:00
Andrew Kelley 33cdf33b95 compiler: update many references to bin_file.options 2024-01-01 17:51:19 -07:00
Andrew Kelley b162c3c820 update bin_file.options references in Module (Zcu) 2024-01-01 17:51:19 -07:00
Andrew Kelley bc4d2b646d compiler: update references to target 2024-01-01 17:51:19 -07:00
Andrew Kelley 1642c003b4 update libunwind references to bin_file.options 2024-01-01 17:51:19 -07:00
Andrew Kelley f5ddef1e45 update references to module (to be renamed to zcu) 2024-01-01 17:51:19 -07:00
Andrew Kelley 41a8f5aec3 remove parent_compilation_link_libc 2024-01-01 17:51:19 -07:00
Andrew Kelley 0789e91eeb linkers: update references to "options" field 2024-01-01 17:51:19 -07:00
Andrew Kelley 3b6cb257df update image_base references 2024-01-01 17:51:19 -07:00