diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31cceae..5717363 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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 diff --git a/extension/static-lib.bzl b/extension/static-lib.bzl index 990d222..7fe43fb 100644 --- a/extension/static-lib.bzl +++ b/extension/static-lib.bzl @@ -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",