Skip to content

Commit

Permalink
attempt to fix macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
Congyuwang committed Nov 2, 2024
1 parent d54c980 commit 2448699
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
export CC=${HOMEBREW_PREFIX}/opt/llvm@19/bin/clang
export CXX=${HOMEBREW_PREFIX}/opt/llvm@19/bin/clang++
export AR=${HOMEBREW_PREFIX}/opt/llvm@19/bin/llvm-ar
export CFLAGS="-flto=thin -O3"
export CXXFLAGS="-flto=thin -O3"
export CFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang"
export CXXFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang"
export LLD=${HOMEBREW_PREFIX}/opt/lld/bin/ld64.lld
export RUSTFLAGS="-Clinker-plugin-lto -Clinker=$PWD/macos-linker.sh -Clink-arg=-fuse-ld=${LLD}"
maturin build --release --target aarch64-apple-darwin --out dist -i ${{ matrix.py_version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
export CC=${HOMEBREW_PREFIX}/opt/llvm@19/bin/clang
export CXX=${HOMEBREW_PREFIX}/opt/llvm@19/bin/clang++
export AR=${HOMEBREW_PREFIX}/opt/llvm@19/bin/llvm-ar
export CFLAGS="-flto=thin -O3"
export CXXFLAGS="-flto=thin -O3"
export CFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang"
export CXXFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang"
export LLD=${HOMEBREW_PREFIX}/opt/lld/bin/ld64.lld
export RUSTFLAGS="-Clinker-plugin-lto -Clinker=$PWD/macos-linker.sh -Clink-arg=-fuse-ld=${LLD}"
maturin build --release --target aarch64-apple-darwin --out dist -i ${{ matrix.py_version }}
Expand Down
12 changes: 6 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ develop:
CC=${HOMEBREW_PREFIX}/opt/llvm/bin/clang \
CXX=${HOMEBREW_PREFIX}/opt/llvm/bin/clang++ \
AR=${HOMEBREW_PREFIX}/opt/llvm/bin/llvm-ar \
CFLAGS="-flto=thin -O3" \
CXXFLAGS="-flto=thin -O3" \
CFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang" \
CXXFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang" \
RUSTFLAGS="-Clinker-plugin-lto -Clinker=$PWD/macos-linker.sh -Clink-arg=-fuse-ld=${HOMEBREW_PREFIX}/opt/lld/bin/ld64.lld" \
maturin develop --release --verbose

Expand All @@ -20,8 +20,8 @@ build:
CC=${HOMEBREW_PREFIX}/opt/llvm/bin/clang \
CXX=${HOMEBREW_PREFIX}/opt/llvm/bin/clang++ \
AR=${HOMEBREW_PREFIX}/opt/llvm/bin/llvm-ar \
CFLAGS="-flto=thin -O3" \
CXXFLAGS="-flto=thin -O3" \
CFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang" \
CXXFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang" \
RUSTFLAGS="-Clinker-plugin-lto -Clinker=$PWD/macos-linker.sh -Clink-arg=-fuse-ld=${HOMEBREW_PREFIX}/opt/lld/bin/ld64.lld" \
maturin build --release --verbose

Expand All @@ -30,7 +30,7 @@ bin:
CC=${HOMEBREW_PREFIX}/opt/llvm/bin/clang \
CXX=${HOMEBREW_PREFIX}/opt/llvm/bin/clang++ \
AR=${HOMEBREW_PREFIX}/opt/llvm/bin/llvm-ar \
CFLAGS="-flto=thin -O3" \
CXXFLAGS="-flto=thin -O3" \
CFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang" \
CXXFLAGS="-flto=thin -O3 --config-system-dir=${HOMEBREW_PREFIX}/etc/clang" \
RUSTFLAGS="-Clinker-plugin-lto -Clinker=$PWD/macos-linker.sh -Clink-arg=-fuse-ld=${HOMEBREW_PREFIX}/opt/lld/bin/ld64.lld" \
cargo build --release --bin create_cf_db

0 comments on commit 2448699

Please sign in to comment.