From 9912bd7821213235c03944f85af6365155fb3247 Mon Sep 17 00:00:00 2001 From: Orhun Parmaksız Date: Tue, 17 Aug 2021 03:52:25 +0300 Subject: Compile the grammar libraries with full RELRO on Linux (#599) * Compile the grammar libraries with full RELRO * Set RELRO compiler options for only Linux--- helix-syntax/build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helix-syntax/build.rs b/helix-syntax/build.rs index 02c4bc0a..ca16f636 100644 --- a/helix-syntax/build.rs +++ b/helix-syntax/build.rs @@ -105,6 +105,9 @@ fn build_library(src_path: &Path, language: &str) -> Result<()> { } } command.arg("-xc").arg(parser_path); + if cfg!(all(unix, not(target_os = "macos"))) { + command.arg("-Wl,-z,relro,-z,now"); + } } let output = command -- cgit v1.2.3-70-g09d2