Skip to content

Commit

Permalink
Compile the grammar libraries with full RELRO on Linux (helix-editor#599
Browse files Browse the repository at this point in the history
)

* Compile the grammar libraries with full RELRO

* Set RELRO compiler options for only Linux
  • Loading branch information
orhun authored Aug 17, 2021
1 parent 14c08e8 commit 9912bd7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helix-syntax/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9912bd7

Please sign in to comment.