You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Managed compilers.[toolchain] compiler = "clang@22" (or "clang@22.1.8", "clang") makes cx download the official LLVM release
into <cache>/toolchains/ on first build, checked against its pinned
SHA-256 before unpacking, and build with it: the same compiler on every
machine. cx pins Clang 20.1.8, 21.1.8, 22.1.8 and 23.1.5 for Linux
(x86-64, AArch64; glibc 2.35+), macOS (Apple silicon) and Windows (x64,
Arm64), and unpacks only what a C/C++ toolchain uses. "msvc" finds
Visual Studio with vswhere; "system" is the default. CC/CXX and the
configuration files win as for cc/cxx; --offline and --locked
never download one. cx toolchain list/install/remove, a compiler line
in cx tools list, a toolchains kind in cx cache, and cx fmt/cx lint use the release's clang-format and clang-tidy.
(Managed compilers)
.tar.xz archives are read by cx itself (a streaming LZMA2 decoder that
decodes multi-block files on several threads), and the downloads behind
them are streamed to disk.
cx why and cx tree --invert.cx why zlib prints the shortest path
from the root to a package, one line per edge with the declaration that
made it (zlib = "^1.2", [dependencies] of png v1.6.43); cx why 'fmt[color]' also says which feature or declaration turned the feature on.
A package that is only in cx.lock for other platforms says so. cx tree --invert NAME shows everything that depends on a package, --depth N limits either tree, and -e features shows which features each
edge enables. (Commands)
A better cx test.cx test parser runs the tests whose name contains parser (--exact, --test NAME; inside a workspace member, by stem), --list prints them, and a final Finished line counts passed, failed and
timed-out tests by name. It stops at the first failure unless --no-fail-fast. --timeout SECS (or [test] timeout in cx.toml), --junit FILE, and test-started/test-finished JSON messages.
(Commands)
Editors find the build's flags. After every configure, cx links compile_commands.json into the project root (a copy on Windows), so
clangd and other language servers resolve dependencies' headers without
setup. It follows the last profile or --target built, and a file cx
didn't write is left alone, with one warning. build.compile-commands
(CX_BUILD_COMPILE_COMMANDS): "root" (default), "none" or a directory. cx new and cx init add /compile_commands.json to .gitignore.
(Editors)
Index entries can point at upstream releases (for a seed index of
existing libraries): url (instead of dl), strip-prefix, options
(CMake options, under the dependent's own) and [version.overlay] (files
laid over the sources, such as a cx.toml, each with its checksum). Zip
archives work as well as .tar.gz. (Upstream archives and overlays)
cx search, cx info and cx outdated.cx search finds packages
by name and description and prints lines to paste into cx.toml; cx info NAME[@REQ] shows a package's versions, features and
dependencies; cx outdated shows locked, compatible and latest versions of
the registry dependencies without changing cx.lock (--depth, workspace
members). All three take --message-format json.
(Commands)
Searchable registries: index entries carry description and license;
static registries get a search.toml, kept current by cx publish --index, cx yank --index and cx-registry, and written by the new cx index search; cx-registry answers GET /api/v1/search.
(Search)
Changed
cx test stops at the first failed test program (ctest's --stop-on-failure); --no-fail-fast runs them all as before.
(Commands)
Fixed
[toolchain] and [target.*] in a workspace's root cx.toml were
ignored; they apply to every member now. (Workspaces)
cx config set build.artifact-keys works: the keys are given
comma-separated or as a TOML list. cx config get and unset accept the
key too. (Configuration)