Skip to content

Commit fd03b0f

Browse files
committed
[extend PGO to C++ parts]
1 parent 5807ab9 commit fd03b0f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/actions/2a-build-pgo/action.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ runs:
1818
cmake_flags: >-
1919
-DBUILD_SHARED_LIBS=OFF
2020
"-DDFLAGS_LDC=-fprofile-generate${{ runner.os == 'Windows' && ' -vp-counters-per-site=1.5' || '' }}"
21-
# -DEXTRA_CXXFLAGS=-fprofile-generate
21+
-DEXTRA_CXXFLAGS=-fprofile-instr-generate
22+
${{ runner.os == 'Linux' && '-DCMAKE_C_COMPILER="$PWD/../clang/bin/clang"' || '' }}
23+
${{ runner.os == 'Linux' && '-DCMAKE_CXX_COMPILER="$PWD/../clang/bin/clang++"' || '' }}
2224
extra_d_flags: ${{ inputs.extra_d_flags }}
2325
arch: ${{ inputs.arch }}
2426
env:

.github/actions/helper-build-ldc/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ runs:
5555
fi
5656
if [[ "$with_pgo" == true ]]; then
5757
flags+="-DDFLAGS_LDC=-fprofile-use=../pgo-ldc/merged.profdata "
58-
#cxx_flags+=(-fprofile-use=../pgo-ldc/merged.profdata)
58+
cxx_flags+=(-fprofile-instr-use=../pgo-ldc/merged.profdata)
5959
fi
6060
6161
if [[ "${#d_flags[@]}" -gt 0 ]]; then

0 commit comments

Comments
 (0)