Skip to content

Commit

Permalink
Compile static on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Aug 6, 2024
1 parent 84a5a9c commit e9960a3
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
run: |
cd build/${{ matrix.backend }}
[ '${{ matrix.backend }}' == 'llvm' ] && LLVM_ARGS='--with-llvm-config' || unset LLVM_ARGS
NPROC=$(nproc)
GNATMAKE="gnatmake -j$NPROC" \
MAKE="make -j$NPROC" \
../../configure --prefix=/opt/ghdl-${{ matrix.backend }} $LLVM_ARGS
- name: 🔨 Make
Expand Down Expand Up @@ -139,6 +143,17 @@ jobs:
run: |
cd build/${{ matrix.backend }}
[ '${{ matrix.backend }}' == 'llvm' ] && LLVM_ARGS='--with-llvm-config' || unset LLVM_ARGS
# Use static libs (including libzstd) and dead-strip (to avoid libz3)
libzstd=$(brew --prefix zstd)/lib/libzstd.a
export LLVM_LDFLAGS="$(llvm-config --link-static --libfiles --system-libs | sed -e s@-lzstd@$libzstd@) -Wl,-dead_strip,-dead_strip_dylibs"
echo $LLVM_LDFLAGS
# Use classic ld and not lld (which simply crashes)
NPROC=$(nproc)
GNATMAKE="gnatmake -j$NPROC" \
MAKE="make -j$NPROC" \
LDFLAGS=-Wl,-ld_classic \
../../configure --prefix=/opt/ghdl-${{ matrix.backend }} $LLVM_ARGS
- name: 🔨 Make
Expand All @@ -154,7 +169,7 @@ jobs:
- name: 📤 Upload 'GHDL' artifact
uses: actions/upload-artifact@v4
with:
name: ghdl-darwin-14.0-aarch64-${{ matrix.backend }}
name: ghdl-macos-14.0-aarch64-${{ matrix.backend }}
path: /opt/ghdl-${{ matrix.backend }}/
if-no-files-found: error
retention-days: 1
Expand Down Expand Up @@ -206,6 +221,10 @@ jobs:
run: |
cd build/${{ matrix.backend }}
[ '${{ matrix.backend }}' == 'llvm' ] && LLVM_ARGS='--with-llvm-config' || unset LLVM_ARGS
NPROC=$(nproc)
GNATMAKE="gnatmake -j$NPROC" \
MAKE="make -j$NPROC" \
../../configure --prefix=/opt/ghdl-${{ matrix.runtime }}-${{ matrix.backend }} $LLVM_ARGS
- name: 🔨 Make
Expand Down

0 comments on commit e9960a3

Please sign in to comment.