Skip to content

Commit

Permalink
ci: Switch from "RelWithDebInfo" to "Release" config for MSVC jobs
Browse files Browse the repository at this point in the history
It is reasonable to test a configuration that is used in the Bitcoin
Core build.

For MSVC, the "Release" config (/O2 /Ob2) is preferable over
"RelWithDebInfo" (/Zi /O2 /Ob1) for the following reasons:

1. /Ob2 can be slightly better than /Ob1 for performance;
see: https://learn.microsoft.com/en-us/cpp/build/reference/ob-inline-function-expansion

2. /Zi, which produces a separate PDB file that contains all the
symbolic debugging information, is incompatible with ccache; see:
https://learn.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format
https://github.com/ccache/ccache/wiki/MS-Visual-Studio
  • Loading branch information
hebasto committed Jun 22, 2024
1 parent 35c0fdc commit 803f2b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ jobs:
run: cmake -E env CFLAGS="/WX ${{ matrix.configuration.cpp_flags }}" cmake -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON ${{ matrix.configuration.cmake_options }}

- name: Build
run: cmake --build build --config RelWithDebInfo -- /p:UseMultiToolTask=true /maxCpuCount
run: cmake --build build --config Release -- /p:UseMultiToolTask=true /maxCpuCount

- name: Binaries info
# Use the bash shell included with Git for Windows.
Expand Down

0 comments on commit 803f2b5

Please sign in to comment.