Compile the grammar libraries with full RELRO on Linux (#599)

* Compile the grammar libraries with full RELRO

* Set RELRO compiler options for only Linux
pull/603/head
Orhun Parmaksız 3 years ago committed by GitHub
parent 14c08e855f
commit 9912bd7821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -105,6 +105,9 @@ fn build_library(src_path: &Path, language: &str) -> Result<()> {
} }
} }
command.arg("-xc").arg(parser_path); command.arg("-xc").arg(parser_path);
if cfg!(all(unix, not(target_os = "macos"))) {
command.arg("-Wl,-z,relro,-z,now");
}
} }
let output = command let output = command

Loading…
Cancel
Save