Skip to content

Commit

Permalink
[extend PGO to C++ parts]
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed May 16, 2022
1 parent fb632b2 commit e35cace
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/actions/2a-build-pgo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ runs:
cmake_flags: >-
-DBUILD_SHARED_LIBS=OFF
"-DDFLAGS_LDC=-fprofile-generate${{ runner.os == 'Windows' && ' -vp-counters-per-site=1.5' || '' }}"
# -DEXTRA_CXXFLAGS=-fprofile-generate
-DEXTRA_CXXFLAGS=-fprofile-instr-generate
${{ runner.os == 'Linux' && '-DCMAKE_C_COMPILER="$PWD/../clang/bin/clang"' || '' }}
${{ runner.os == 'Linux' && '-DCMAKE_CXX_COMPILER="$PWD/../clang/bin/clang++"' || '' }}
extra_d_flags: ${{ inputs.extra_d_flags }}
arch: ${{ inputs.arch }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/helper-build-ldc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:
fi
if [[ "$with_pgo" == true ]]; then
flags+="-DDFLAGS_LDC=-fprofile-use=../pgo-ldc/merged.profdata "
#cxx_flags+=(-fprofile-use=../pgo-ldc/merged.profdata)
cxx_flags+=(-fprofile-instr-use=../pgo-ldc/merged.profdata)
fi
if [[ "${#d_flags[@]}" -gt 0 ]]; then
Expand Down

0 comments on commit e35cace

Please sign in to comment.