From 6930687d01ab9629d91eacd8d41029fc89710d8c Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Sun, 3 Oct 2021 10:13:09 +0200 Subject: [PATCH] fix(ci): add missing c flags in M1 pipeline --- .github/workflows/ci.yml | 3 +++ espanso-modulo/build.rs | 12 ++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95ad8d1..aa9c39c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,5 +60,8 @@ jobs: - name: Build run: | cargo make build-macos-arm-binary + - name: Debug + run: | + file target/aarch64-apple-darwin/debug/espanso # TODO: add clippy check \ No newline at end of file diff --git a/espanso-modulo/build.rs b/espanso-modulo/build.rs index 5859e8f..0c5be65 100644 --- a/espanso-modulo/build.rs +++ b/espanso-modulo/build.rs @@ -200,6 +200,7 @@ fn build_native() { "-isysroot {} -isystem {} -DSTDC_HEADERS=1 -DHAVE_FCNTL_H -arch arm64 -arch x86_64", xcode_sdk_path, xcode_sdk_path ); + let configure_c_flags = "-arch arm64 -arch x86_64"; Command::new(out_wx_dir.join("configure")) .current_dir(build_dir.to_string_lossy().to_string()) @@ -211,6 +212,7 @@ fn build_native() { "--with-libpng=builtin", ]) .env("CXXFLAGS", &configure_cxx_flags) + .env("CFLAGS", configure_c_flags) .spawn() .expect("failed to execute configure") } else { @@ -303,16 +305,6 @@ fn convert_fat_libraries_to_arm(lib_dir: &Path) { { let path = entry.expect("unable to unwrap glob entry"); - if path - .file_name() - .unwrap_or_default() - .to_string_lossy() - .contains("-arm.a") - { - println!("skipping {} as it's already arm", path.to_string_lossy()); - continue; - } - // Make sure it's a fat library let lipo_output = std::process::Command::new("lipo") .args(&["-detailed_info", &path.to_string_lossy().to_string()])