Skip to content

Commit

Permalink
fix wrong archive format
Browse files Browse the repository at this point in the history
  • Loading branch information
sphw committed Mar 31, 2024
1 parent b0f1550 commit 541680f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
steps:
- name: Install libtool-bin
run: |
sudo apt-get update && sudo apt-get install -y libtool-bin
sudo apt-get update && sudo apt-get install -y libtool-bin llvm
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
# Add repository with the latest git version for action/checkout to properly clone the repo
add-apt-repository ppa:git-core/ppa
# We run as root, so sudo is not necessary per se, but some actions (like setup-bazel) make use of it
apt-get update && apt-get install -y ca-certificates curl git sudo unzip wget libtool-bin
apt-get update && apt-get install -y ca-certificates curl git sudo unzip wget libtool-bin llvm
# Install GitHub CLI used by our scripts
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
Expand Down
6 changes: 2 additions & 4 deletions extension/static-lib.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ def _cc_static_library_impl(ctx):

lib_paths = [lib.path for lib in libs]

ar_path = cc_toolchain.ar_executable
# FIXME ar_executable returned llvm-lib.exe on my system, but we want llvm-ar.exe
ar_path = ar_path.replace("llvm-lib.exe", "llvm-ar.exe")
ar_path = "llvm-ar"

ctx.actions.run_shell(
command = "\"{0}\" rcs {1} {2} && echo -e 'create {1}\naddlib {1}\nsave\nend' | \"{0}\" -M".format(ar_path, output_lib.path, " ".join(lib_paths)),
command = "\"{0}\" rcT {1} {2} && echo -e 'create {1}\naddlib {1}\nsave\nend' | \"{0}\" -M".format(ar_path, output_lib.path, " ".join(lib_paths)),
inputs = libs + cc_toolchain.all_files.to_list(),
outputs = [output_lib],
mnemonic = "ArMerge",
Expand Down

0 comments on commit 541680f

Please sign in to comment.