Add DCMAKE_POSITION_INDEPENDENT_CODE flag

This commit is contained in:
Arnaud 2025-10-10 13:16:02 +02:00
parent d28971e4cf
commit c604e441c1
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F
2 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential pkg-config
make update
make libcodex
CODEX_LIB_PARAMS="-d:LeopardCmakeFlags=\"-DCMAKE_POSITION_INDEPENDENT_CODE=ON\"" make libcodex
- name: Build libcodex (macOS)
if: runner.os == 'macOS' && steps.cache-libcodex.outputs.cache-hit != 'true'
@ -60,7 +60,7 @@ jobs:
brew update
brew install coreutils
make update
make libcodex
CODEX_LIB_PARAMS="-d:LeopardCmakeFlags=\"-DCMAKE_POSITION_INDEPENDENT_CODE=ON\"" make libcodex
- name: MSYS2 (Windows i386)
if: matrix.os == 'windows-latest' && matrix.cpu == 'i386' && steps.cache-libcodex.outputs.cache-hit != 'true'
@ -94,7 +94,7 @@ jobs:
pacman -Sy --noconfirm make
git config --global core.symlinks false
make update
make libcodex
CODEX_LIB_PARAMS="-d:LeopardCmakeFlags=\"-DCMAKE_POSITION_INDEPENDENT_CODE=ON\"" make libcodex
- name: Package artifacts (Linux/macOS)
if: matrix.os != 'windows-latest'

View File

@ -41,7 +41,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y build-essential
make update
CODEX_LIB_PARAMS="-d:codex_enable_api_debug_peers=true" make libcodex
CODEX_LIB_PARAMS="-d:codex_enable_api_debug_peers=true -d:LeopardCmakeFlags=\"-DCMAKE_POSITION_INDEPENDENT_CODE=ON\"" make libcodex
- name: Build codex go
run: make