Skip to content

Commit

Permalink
Only define FULL_LTO if Clang is being used
Browse files Browse the repository at this point in the history
  • Loading branch information
bdutro-mips committed Oct 16, 2024
1 parent 81e7050 commit 81a4a4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
LTO_CONFIG: ${{ matrix.build_type == 'Release' && format('-DNO_STF_LTO={0} -DFULL_LTO={1}', !matrix.lto_config.lto, matrix.lto_config.full_lto) || '' }}
LTO_CONFIG: ${{ matrix.build_type == 'Release' && format('-DNO_STF_LTO={0}, !matrix.lto_config.lto) || '' }}
CLANG_FULL_LTO_CONFIG: ${{ (matrix.compiler == 'clang' && matrix.build_type == 'Release') && format('-DFULL_LTO={1}', matrix.lto_config.full_lto) || '' }}

runs-on: ubuntu-latest

Expand All @@ -53,7 +54,7 @@ jobs:

- name: Configure CMAKE
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_STF_PYTHON_LIB=ON $LTO_CONFIG
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_STF_PYTHON_LIB=ON $LTO_CONFIG $CLANG_FULL_LTO_CONFIG

- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down

0 comments on commit 81a4a4b

Please sign in to comment.