
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Find the full documentation at https://clang-build.readthedocs.io
Motivation:
Goals:
What it's not designed to do:
Related resources:
In order to run clang-build
, you only need Clang and Python3.
Install via pip install clang-build
(add the --user
flag if you don't have admin rights).
Running clang-build
will try to build the current directory.
The command-line options include
-d path/to/dir
to build a different directory-p
to show a progress bar-V
to print some additional info--debug
to print the called clang commandsThe given directory will be searched for a clang-build.toml
file, which you can use to configure
your build targets, if necessary. However, if you only want to build an executable, you will
likely not even need a build file.
clang-build tries to use sane defaults, designed to make most projects very easy to configure and even complex projects far easier than with common build or meta-build systems.
Examples of real-world used and tested projects, which can be easily be integrated
into your project using clang-build
:
Note: not all of these are implemented, yet.
This would be things that require only the invocation of clang-build
and no build file.
Sane defaults and default behaviour:
This would be things that only require a minimal TOML project file
#define
s, ...)Steps that would involve more effort from the user, including possibly some python code
Note:
root
and <targetname>
folders, as well as "include" and "src" subdirectories
will be searched for ".hpp", ".hxx", ".h" and ".cpp", ".cxx" and ".c" filestarget_type
, but with source files will be an executableoutput_name
should not contain pre- or suffixes such as lib, .exe, .so, as they are added automatically# Top-level brackets indicate a target
[hello]
output_name = "runHello"
# Build a library
[mylib]
target_type = "shared library"
# Build an executable and link the library
[myexe]
output_name = "runExe"
target_type = "executable"
dependencies = ["mylib"]
[myexe.flags]
link = ["-DMYEXE_SOME_DEFINE"]
Note:
include_directories
and sources
sources
, headers_exclude
and sources_exclude
expect a list of globbing patterns or files (not folders!)[mylib]
url = "https://github.com/trick-17/mylib"
version = 1.1 # will try to `git checkout 1.1`
directory = "sources" # will point to "build/mylib/external_sources/sources"
include_directories = ["mylib/include"] # will point to "build/mylib/external_sources/sources/mylib/include"
sources = ["mylib/src/*"] # will list everything inside "build/mylib/external_sources/sources/mylib/src"
# Maybe we need to deactivate annoying warnings coming from the library
[mylib.flags]
compile = ["-Wno-deprecated-declarations", "-Wno-self-assign"]
# Build an executable and link the library
[myexe]
dependencies = ["mylib"]
FAQs
Easy build tool for C++ projects focussing on simplicity
We found that clang-build demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.