Remove the use of -use-gnu-stack when BOLTing LLVM

This flag (counterintuitively) was removing the `GNU_STACK` ELF attribute, which caused the optimized `libLLVM.so` file to be flagged as having an executable stack on SELinux.
This commit is contained in:
Jakub Beránek 2023-04-04 21:07:19 +02:00
parent 540a50df0f
commit c32953f44f
No known key found for this signature in database
GPG Key ID: 909CD0D26483516B

View File

@ -45,8 +45,6 @@ pub fn optimize_with_bolt(path: &Path, profile_path: &Path, output_path: &Path)
.arg("-split-all-cold")
// Move jump tables to a separate section
.arg("-jump-tables=move")
// Use GNU_STACK program header for new segment (workaround for issues with strip/objcopy)
.arg("-use-gnu-stack")
// Fold functions with identical code
.arg("-icf=1")
// Update DWARF debug info in the final binary