Skip to content

Commit

Permalink
Fix arm64 apple darwin compile [skip skia]
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Feb 5, 2024
1 parent 862a498 commit f4f95a5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ jobs:
setup: |
brew install llvm
build: |
sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
export CC=$(xcrun -f clang);
export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
export MACOSX_DEPLOYMENT_TARGET='11.0'
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
clang --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cargo-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: stable - macOS - cargo - test
runs-on: macos-latest
runs-on: macos-14

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ fn main() {
}
"macos" => {
build.cpp_set_stdlib("c++");
if compile_target_arch == "aarch64" {
build.flag("-mmacosx-version-min=11.0");
} else {
build.flag("-mmacosx-version-min=10.13");
}
println!("cargo:rustc-link-lib=c++");
println!("cargo:rustc-link-lib=framework=ApplicationServices");
}
Expand Down
3 changes: 0 additions & 3 deletions skia-c/skia_c.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ typedef struct skiac_picture skiac_picture;
#define SK_FONT_FILE_PREFIX "/usr/share/fonts/"
#endif

sk_sp<SkFontMgr>
SkFontMgr_New_Custom_Directory(const char *dir);

enum class CssBaseline
{
Top,
Expand Down

1 comment on commit f4f95a5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: f4f95a5 Previous: c0be5da Ratio
Draw house#skia-canvas 29.5 ops/sec (±0.3%) 29.51 ops/sec (±0.36%) 1.00
Draw house#node-canvas 38 ops/sec (±1.36%) 37.26 ops/sec (±0.59%) 0.98
Draw house#@napi-rs/skia 29.8 ops/sec (±0.28%) 29.52 ops/sec (±0.8%) 0.99
Draw gradient#skia-canvas 28 ops/sec (±1.33%) 28.5 ops/sec (±0.25%) 1.02
Draw gradient#node-canvas 36 ops/sec (±0.49%) 36.3 ops/sec (±0.53%) 1.01
Draw gradient#@napi-rs/skia 29 ops/sec (±0.53%) 28.3 ops/sec (±0.64%) 0.98

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.