Release of ForgeZero 1.9.0 (fz) has been published, a console build tool for projects in C, C++, and assembly languages (NASM, GAS, FASM). The tool does not require creating a Makefile or any other configuration files for basic use. The project code is written in Go and is distributed under the MIT license.
ForgeZero determines the file type and automatically selects the required backend. Each code file is compiled into an object file, after which a check for duplicate global symbols across all objects is performed, followed by linking into a single executable file. Compiled files are cached and are only rebuilt after changes to their associated code files. Optional tracking of changes in the file system and rebuilding after code file updates is possible.
Supports compilers GCC, Clang, G++, Clang++; assemblers NASM, GAS, FASM; linkers LD, GCC, Clang; archivers AR. Mandatory warnings for C and C++: "-Wall -Wextra -Werror -Wpedantic -Wshadow -Wconversion". AddressSanitizer and UndefinedBehaviorSanitizer are enabled by default (can be disabled with the flag -sanitize=false). Supported platforms include Linux, macOS, Windows (WSL2, and experimentally natively).
Key changes in version 1.9.0:
- Added the flag "-target" , allowing for cross-compilation for arbitrary architectures when the corresponding prefix toolchain is available. fz 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 root of the project. This file is read by the languages servrar clangd and ccls, providing autocompletion, code navigation, and diagnostics in editors that support LSP (Neovim, VSCode, CLion, Emacs, etc.).
- The fz command "-update" now saves the current binary file to /usr/local/bin/fz.old before installing a new version, allowing rollback to the previous version without reinstalling.
- En bugg har ÄtgÀrdats dÀr filer med samma grundnamn frÄn olika underkataloger i multidirektory-projekt överskrev varandras objektfiler. Namnen pÄ objektfilerna genereras nu baserat pÄ den fullstÀndiga relativa vÀgen till kÀllfilen.
- Interaktivt lÀge "fz -shell" har implementerats för att skapa enskilda filer.
- TesttÀckning har lagts till för kommandon SplitCommand, CmdSet och CmdBuild. TesttÀckningen för lÀnkaren har ökat frÄn 17 % till 60 %, och tÀckningen för alla paket har överstigit 40 %.
- En ersÀttningsmekanism för CheckTool har lagts till för att testa scenarier med saknade komponenter i verktygskedjan.
Ăndringar i tidigare versioner:
- I version 1.8.0 har byggande av statiska bibliotek (-type static / -lib) implementerats, unikhet i namn pÄ objektfiler har sÀkerstÀllts i multidirektory-projekt, och fel relaterade till byggsystemet som involverade vÀgen ".." har ÄtgÀrdats.
- I version 1.7.0 har parallell kompilering (-j N, 0 - automatisk identifiering av antalet kÀrnor), stöd för lÀnkarskript (-T), ingÄngsadress (-Ttext), interaktivt lÀge (fz -shell), explicit val av utgÄngsformat (elf32, elf64, bin), och kompilering av C++-filer (.cpp, .cc, .cxx) med samma strikta varningsflaggor som för C lagts till.
- I version 1.6.0 har projektinitiering (fz -init, skapar .fz.yaml, .fzignore, README.md), stöd för bin-format (-format bin) för laddare och firmwares, och konfigurationsfÀlt för libs, flags.cc, flags.asm, flags.ld lagts till.
- I version 1.5.0 har flera kÀllkataloger (source_dirs), explicita filistor (source_files), include/exclude-mallar, fÀlt för bibliotek för lÀnkaren, filen .fzignore och flerradig sammanslagning av konfigurationsfiler implementerats.
KĂ€lla: opennet.ru
