Release of ForgeZero 1.9.0, a build tool for C and assembler.

ForgeZero 1.9.0 (fz) has been released, a console build tool for projects in C, C++, and assembly (NASM, GAS, FASM). The tool does not require a Makefile or other configuration files for basic usage. The project code is written in Go and is distributed under the MIT license.

ForgeZero determines the file type and automatically selects the necessary backend. Each code file is compiled into an object file, after which duplicate global symbols are checked across all objects and linked into a single executable file. Compiled files are cached and rebuilt only after changes are made to the associated code files. Optionally, file system change tracking can be enabled, allowing for rebuilding after file updates.

Supports compilers GCC, Clang, G++, Clang++; assemblers NASM, GAS, FASM; linkers LD, GCC, Clang; archiver AR. Required warnings for C and C++: "-Wall -Wextra -Werror -Wpedantic -Wshadow -Wconversion". By default, AddressSanitizer and UndefinedBehaviorSanitizer are enabled (can be disabled with the -sanitize=false flag). Supported platforms include Linux, macOS, and Windows (WSL2 and experimental native support).

Key changes in version 1.9.0:

  • A new flag "-target" has been added, enabling cross-compilation for arbitrary architectures when the corresponding prefixed toolchain is available. Fz automatically determines the names of the compiler, linker, and archiver based on the specified identifier (e.g., "arm-linux-gnueabihf-gcc"). Any standard GNU target platforms are supported, including arm-linux-gnueabihf, aarch64-linux-gnu, and riscv64-linux-gnu.
  • Support for the LSP (Language Server Protocol) has been implemented. The flag "-compile-commands" generates a compile_commands.json file (Compilation Database) in the project root. The file is read by the clangd and ccls language servers, enabling autocompletion, code navigation, and diagnostics in editors that support LSP (Neovim, VSCode, CLion, Emacs, etc.). servers The fz command "-update" now saves the current binary file to /usr/local/bin/fz.old before installing a new version, allowing users to revert to the previous version without needing to reinstall.
  • The fz command "-update" now saves the current binary file to /usr/local/bin/fz.old before installing a new version, allowing you to revert to the previous version without reinstalling.
  • The error has been fixed where files with the same base names from different subdirectories would overwrite each other's object files in multi-directory projects. Object file names are now generated based on the full relative path to the source file.
  • An interactive mode 'fz -shell' has been implemented for building single files.
  • Test coverage has been added for the SplitCommand, CmdSet, and CmdBuild commands. The coverage for the linker package has increased from 17% to 60%, and coverage across all packages has exceeded 40%.
  • A CheckTool replacement mechanism has been added for testing scenarios with missing toolchain components.

Changes from previous releases:

  • In version 1.8.0, static library builds (-type static / -lib) have been implemented, ensuring unique object file names in multi-directory projects, and bugs in the build subsystem related to path traversal '..' have been fixed.
  • In version 1.7.0, parallel compilation (-j N, 0 — auto-detect number of cores), support for linker scripts (-T), entry point addressing (-Ttext), interactive mode (fz -shell), explicit output format selection (elf32, elf64, bin), and C++ file compilation (.cpp, .cc, .cxx) with the same strict warning flags as for C have been added.
  • In version 1.6.0, project initialization (fz -init creates .fz.yaml, .fzignore, README.md), support for bin format (-format bin) for loaders and firmware, and configuration fields libs, flags.cc, flags.asm, flags.ld have been added.
  • In version 1.5.0, multiple source directories (source_dirs), explicit file lists (source_files), include/exclude templates, a libs field for the linker, the .fzignore file, and hierarchical merging of configuration files have been implemented.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster