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

* Compile the grammar libraries with full RELRO

* Set RELRO compiler options for only Linux
This commit is contained in:
Orhun Parmaksız 2021-08-17 03:52:25 +03:00 committed by GitHub
parent 14c08e855f
commit 9912bd7821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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