Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.