on master help sign in
Compile the grammar libraries with full RELRO on Linux (#599)

* Compile the grammar libraries with full RELRO * Set RELRO compiler options for only Linux

commit9912bd7821213235c03944f85af6365155fb3247 authorOrhun Parmaksız <orhunparmaksiz@gmail.com> dateTue 17 Aug 2021, 03:52 (5 years ago) parent14c08e8
1 file changed+3
helix-syntax/build.rs+3
helix-syntax/build.rs+3
@@ -105,6 +105,9 @@ fn build_library(src_path: &Path, language: &str) -> Result<()> {
105105 }
106106 }
107107 command.arg("-xc").arg(parser_path);
108+ if cfg!(all(unix, not(target_os = "macos"))) {
109+ command.arg("-Wl,-z,relro,-z,now");
110+ }
108111 }
109112
110113 let output = command