1
0
mirror of https://github.com/facebook/zstd.git synced 2025-04-19 00:44:19 +03:00
Victor Zhang 7b856e3028 Add noexecstack flag for gcc/clang C and CPP in Meson
The `-Wl,-z,noexecstack` and `-Wa,--noexecstack` flags are already set for CMake, but not for Meson.
This brings the flags to the Meson build as well. Note that this maintains the discrepancy in behavior
between CMake and Meson when it comes to enabling ASM: on CMake, the ZSTD_HAS_NOEXECSTACK variable
is set and these flags added for GCC/Clang and MinGW. Then later, the ZSTD_HAS_NOEXECSTACK variable
is checked (along with some other conditions) to enable or disable ASM. However on Meson, this logic
is restricted to simply checking for GCC/Clang. This patch maintains this behavior; noexecstack is
dependent on GCC/Clang only.
2025-02-04 15:20:39 -08:00
..
2024-10-23 11:50:56 -07:00
2024-01-29 15:50:21 -08:00
2024-09-30 18:05:57 +03:00

Meson build system for zstandard

Meson is a build system designed to optimize programmer productivity. It aims to do this by providing simple, out-of-the-box support for modern software development tools and practices, such as unit tests, coverage reports, Valgrind, CCache and the like.

This Meson build system is provided with no guarantee and maintained by Dima Krasner <dima@dimakrasner.com>.

It outputs one libzstd, either shared or static, depending on default_library option.

How to build

cd to this meson directory (build/meson)

meson setup -Dbin_programs=true -Dbin_contrib=true builddir
cd builddir
ninja             # to build
ninja install     # to install

You might want to install it in staging directory:

DESTDIR=./staging ninja install

To configure build options, use:

meson configure

See man meson(1).