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
 | 
			
		||||
        run: |
 | 
			
		||||
          cargo make build-macos-arm-binary
 | 
			
		||||
      - name: Debug
 | 
			
		||||
        run: |
 | 
			
		||||
          file target/aarch64-apple-darwin/debug/espanso
 | 
			
		||||
 | 
			
		||||
# TODO: add clippy check
 | 
			
		||||
| 
						 | 
				
			
			@ -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()])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user