fix(ci): add missing c flags in M1 pipeline
This commit is contained in:
parent
b7a80c956a
commit
6930687d01
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -60,5 +60,8 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cargo make build-macos-arm-binary
|
cargo make build-macos-arm-binary
|
||||||
|
- name: Debug
|
||||||
|
run: |
|
||||||
|
file target/aarch64-apple-darwin/debug/espanso
|
||||||
|
|
||||||
# TODO: add clippy check
|
# TODO: add clippy check
|
|
@ -200,6 +200,7 @@ fn build_native() {
|
||||||
"-isysroot {} -isystem {} -DSTDC_HEADERS=1 -DHAVE_FCNTL_H -arch arm64 -arch x86_64",
|
"-isysroot {} -isystem {} -DSTDC_HEADERS=1 -DHAVE_FCNTL_H -arch arm64 -arch x86_64",
|
||||||
xcode_sdk_path, xcode_sdk_path
|
xcode_sdk_path, xcode_sdk_path
|
||||||
);
|
);
|
||||||
|
let configure_c_flags = "-arch arm64 -arch x86_64";
|
||||||
|
|
||||||
Command::new(out_wx_dir.join("configure"))
|
Command::new(out_wx_dir.join("configure"))
|
||||||
.current_dir(build_dir.to_string_lossy().to_string())
|
.current_dir(build_dir.to_string_lossy().to_string())
|
||||||
|
@ -211,6 +212,7 @@ fn build_native() {
|
||||||
"--with-libpng=builtin",
|
"--with-libpng=builtin",
|
||||||
])
|
])
|
||||||
.env("CXXFLAGS", &configure_cxx_flags)
|
.env("CXXFLAGS", &configure_cxx_flags)
|
||||||
|
.env("CFLAGS", configure_c_flags)
|
||||||
.spawn()
|
.spawn()
|
||||||
.expect("failed to execute configure")
|
.expect("failed to execute configure")
|
||||||
} else {
|
} else {
|
||||||
|
@ -303,16 +305,6 @@ fn convert_fat_libraries_to_arm(lib_dir: &Path) {
|
||||||
{
|
{
|
||||||
let path = entry.expect("unable to unwrap glob entry");
|
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
|
// Make sure it's a fat library
|
||||||
let lipo_output = std::process::Command::new("lipo")
|
let lipo_output = std::process::Command::new("lipo")
|
||||||
.args(&["-detailed_info", &path.to_string_lossy().to_string()])
|
.args(&["-detailed_info", &path.to_string_lossy().to_string()])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user