Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions aws-lc-sys/builder/cc_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ impl CcBuilder {
if !cflags.is_empty() {
set_env_for_target("CFLAGS", cflags);
}

// Add --noexecstack flag for assembly files to prevent executable stacks
// This matches the behavior of AWS-LC's CMake build which uses -Wa,--noexecstack
// See: https://github.com/aws/aws-lc/blob/main/crypto/CMakeLists.txt#L77
if target_os() == "linux" || target_os().ends_with("bsd") {
cc_build.asm_flag("-Wa,--noexecstack");
}

cc_build
}

Expand Down
Loading