]> git.ipfire.org Git - thirdparty/zstd.git/commit
Add noexecstack flag for gcc/clang C and CPP in Meson mesonNoexec 4284/head
authorVictor Zhang <csv@meta.com>
Tue, 4 Feb 2025 23:20:39 +0000 (15:20 -0800)
committerVictor Zhang <csv@meta.com>
Tue, 4 Feb 2025 23:20:39 +0000 (15:20 -0800)
commit7b856e3028518109eb34019e215802cda7cbafc1
tree78e78ec759c19e33dc6e0c88aa8cd45784eaa93d
parent26a2b5d5dfae463beab4374cd5cb70706ec3ed6c
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.
build/meson/meson.build