Commit Graph

7 Commits

Author SHA1 Message Date
Joey Parrish
9be7c2b1ac
feat: Portable, fully-static release executables on Linux (#1351)
This adds the option FULLY_STATIC to create fully-static executables.

To create portable, fully-static release executables on Linux, we need
to use musl instead of glibc. Static executables from glibc are not
portable.

The popular musl-gcc wrapper does not support C++, so instead we use a
full musl cross-compiler toolchain in the build workflow.

To build FULLY_STATIC, the user must point to the appropriate
cross-compiler, as we do in the workflow. On systems where musl is the
native libc (such as Alpine Linux), this is not necessary.

I have also read that musl's allocator is not very fast in
multi-threaded applications. So when FULLY_STATIC is enabled, we will
also enable mimalloc, a replacement allocator that is very fast.

I tested a very basic packaging command to compare speeds of dynamic
glibc, static musl, and static musl+mimalloc:

dynamic glibc:
runs: 2.527, 2.798, 2.703, 2.756, 2.959
avg = 2.749, std dev = 0.156s

static musl:
runs: 2.813, 2.920, 3.129, 3.003, 2.738
avg = 2.921s, std dev = 0.154s

static musl+mimalloc:
runs: 2.291, 2.034, 2.415, 2.303, 2.265
avg = 2.262s, std dev = 0.140s

The mimalloc build is 82% faster than musl default allocator, 77% faster
than glibc, and has more consistent runtime characteristics (lower
standard deviation).
2024-02-27 10:47:04 -08:00
Joey Parrish
df04d0ed6e
chore: Unfork zlib (#1339)
The issues we had with zlib and CMake have been resolved upstream.
2024-02-12 14:10:51 -08:00
Joey Parrish
3e71302ba4
feat!: Rewrite build system and third-party dependencies (#1310)
This work was done over ~80 individual commits in the `cmake` branch,
which are now being merged back into `main`. As a roll-up commit, it is
too big to be reviewable, but each change was reviewed individually in
context of the `cmake` branch. After this, the `cmake` branch will be
renamed `cmake-porting-history` and preserved.

---------

Co-authored-by: Geoff Jukes <geoffjukes@users.noreply.github.com>
Co-authored-by: Bartek Zdanowski <bartek.zdanowski@gmail.com>
Co-authored-by: Carlos Bentzen <cadubentzen@gmail.com>
Co-authored-by: Dennis E. Mungai <2356871+Brainiarc7@users.noreply.github.com>
Co-authored-by: Cosmin Stejerean <cstejerean@gmail.com>
Co-authored-by: Carlos Bentzen <carlos.bentzen@bitmovin.com>
Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
Co-authored-by: Cosmin Stejerean <cosmin@offbytwo.com>
2023-12-01 09:32:19 -08:00
Kongqun Yang
0c2d7cfa33 Add an empty .gitmodules to avoid gclient warning 2014-03-28 22:13:33 +00:00
Kongqun Yang
4a8e868e8f Remove submodules, third_party, testing, and tools
This is preparing for gclient switching.

Build break is expected. Some change in build script is required.

Change-Id: I4ebb78d3ae3114318c101ff4927954c89fce9a1d
2014-03-20 00:56:02 +00:00
Kongqun Yang
6046cde3d8 Remove valgrind and include it using submodule
Change-Id: I4cfdb6bb908a386ad29b9932534cc5d187106f79
2014-03-17 18:05:04 +00:00
Kongqun Yang
5708e90c82 Setup git submodules for all sources included from chromium
Some of the modules was semi-setup when copied from chromium.

With submodule setup, the user may use git submodule init and update
to update the submodules.

Change-Id: Ief0899c1567cd2be9a55710f7f81c0eb74461f50
2014-03-03 21:29:09 +00:00