Skip to content
Closed
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
9 changes: 9 additions & 0 deletions phper-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ fn main() {
let includes = execute_command(&[php_config.as_str(), "--includes"]);
let includes = includes.split(' ').collect::<Vec<_>>();

let mut extas_args = Vec::new();
if cfg!(all(
target_arch = "aarch64",
any(target_os = "macos", target_os = "ios")
)) {
extas_args.push("-mno-neon");
}

// Generate libphpwrapper.a.

let mut builder = cc::Build::new();
Expand Down Expand Up @@ -49,6 +57,7 @@ fn main() {
// Block the `zend_random_bytes_insecure` because it fails checks.
.blocklist_item("zend_random_bytes_insecure")
.clang_args(&includes)
.clang_args(&extas_args)
.derive_default(true);

// iterate over the php include directories, and update the builder
Expand Down
Loading