From dde0613ecd63df925581290540006651bd9d213a Mon Sep 17 00:00:00 2001 From: Nipunn Koorapati Date: Mon, 1 Apr 2024 13:54:34 -0700 Subject: [PATCH] Unset the dynamic linking compiler optimizations in precompile (#24195) Since we're building a precompiled binary, we want the full binary statically linked. GitOrigin-RevId: 294e35084e3c023caa9b410ddec36155d3e6147d --- .github/actions/setup-rust/action.yml | 12 ------------ .github/workflows/precompile.yml | 6 +++++- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index bfb8e89f..096a1a81 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -19,14 +19,6 @@ runs: if: runner.os == 'Linux' run: sudo apt-get install pkg-config libsodium-dev - - name: Install libsodium and pkg-config - shell: bash - env: - HOMEBREW_NO_AUTO_UPDATE: 1 - HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 - if: runner.os == 'MacOS' - run: brew install pkg-config libsodium rocksdb - - name: Install Just uses: extractions/setup-just@v1 env: @@ -49,10 +41,6 @@ runs: echo "SODIUM_USE_PKG_CONFIG=1" >> $GITHUB_ENV echo "ROCKSDB_LIB_DIR=/usr/lib" >> $GITHUB_ENV fi - if [ "$RUNNER_OS" == "MacOS" ]; then - echo "SODIUM_USE_PKG_CONFIG=1" >> $GITHUB_ENV - echo "ROCKSDB_LIB_DIR=$(ls -d /usr/local/Cellar/rocksdb/*/lib)" >> $GITHUB_ENV - fi echo "SCCACHE_ENDPOINT=https://a4aa0fffebef8bc497f64875c40ee6fb.r2.cloudflarestorage.com" >> $GITHUB_ENV echo "SCCACHE_BUCKET=cvx-actions-cache" >> $GITHUB_ENV echo "SCCACHE_REGION=auto" >> $GITHUB_ENV diff --git a/.github/workflows/precompile.yml b/.github/workflows/precompile.yml index 8fe1e977..f2552b46 100644 --- a/.github/workflows/precompile.yml +++ b/.github/workflows/precompile.yml @@ -66,7 +66,11 @@ jobs: just rush build - name: Build backend - run: cargo build --release -p local_backend --bin convex-local-backend + run: | + unset ROCKSDB_LIB_DIR + unset SODIUM_USE_PKG_CONFIG + unset SNAPPY_LIB_DIR + cargo build --release -p local_backend --bin convex-local-backend - name: Zip backend into arch run: |