diff options
author | Orhun Parmaksız | 2021-08-17 00:52:25 +0000 |
---|---|---|
committer | GitHub | 2021-08-17 00:52:25 +0000 |
commit | 9912bd7821213235c03944f85af6365155fb3247 (patch) | |
tree | 61a0fdf94c234d2b0e8d2d7302dfda03bc68c47d /helix-syntax | |
parent | 14c08e855f6d0ebfbf1d7cb5d7010507ad3a5db6 (diff) |
Compile the grammar libraries with full RELRO on Linux (#599)
* Compile the grammar libraries with full RELRO
* Set RELRO compiler options for only Linux
Diffstat (limited to 'helix-syntax')
-rw-r--r-- | helix-syntax/build.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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 |