<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Build on Matt Bolitho</title><link>https://mattbolitho.github.io/tags/build/</link><description>Recent content in Build on Matt Bolitho</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><copyright>Matt Bolitho</copyright><lastBuildDate>Thu, 24 Oct 2024 20:00:00 +0000</lastBuildDate><atom:link href="https://mattbolitho.github.io/tags/build/index.xml" rel="self" type="application/rss+xml"/><item><title>Tiny C++ container images with `-static`</title><link>https://mattbolitho.github.io/posts/generating-statics-executables-with-clang/</link><pubDate>Thu, 24 Oct 2024 20:00:00 +0000</pubDate><guid>https://mattbolitho.github.io/posts/generating-statics-executables-with-clang/</guid><description>Both gcc and clang support the -static compilation option. When we pass this option, we are asking the compiler to create a static executable. That is, an executable with no dynamic dependencies.
If we compile a &amp;ldquo;Hello World&amp;rdquo; program both with (with-static) and without (no-static) this option enabled, we can see the difference highlighted by ldd. For reference, I am using clang++-19 with the mold linker on an amd64 based Ubuntu 24.</description></item><item><title>vcpkg with libc++</title><link>https://mattbolitho.github.io/posts/vcpkg-with-libcxx/</link><pubDate>Wed, 17 Apr 2024 08:00:00 +0000</pubDate><guid>https://mattbolitho.github.io/posts/vcpkg-with-libcxx/</guid><description>I have been using vcpkg for a few C++ projects recently. Over the last few months or so, I have mostly been switching over to LLVM tools for my personal C++ projects.
One small pain point is that, if you link against libc++ with your consuming project that links against libraries from vcpkg, you will almost certainly get linker errors. This is because vcpkg will link libraries against libstdc++ by default and, because your project uses libc++ instead, you will get undefined symbols.</description></item></channel></rss>