Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.1.0] disable boringssl debug symbols on release builds; restore reproducible builds in CI #1165

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libraries/libfc/libraries/boringssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ target_compile_options(fipsmodule PRIVATE -Wno-error)
target_compile_options(crypto PRIVATE -Wno-error)
target_compile_options(decrepit PRIVATE -Wno-error)

# boringssl's forced-on debug symbols interfere with reproducibility due to path differences; disable on Release builds
if(CMAKE_BUILD_TYPE STREQUAL "Release")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking CMAKE_BUILD_TYPE like this isn't ideal at all and maybe even borderline anti-pattern. But I'm not really sure what other indicator to use of "no thanks I don't want debug symbols"

target_compile_options(fipsmodule PRIVATE -g0)
target_compile_options(crypto PRIVATE -g0)
target_compile_options(decrepit PRIVATE -g0)
endif()

#paranoia for when a dependent library depends on openssl (such as libcurl)
set_target_properties(fipsmodule PROPERTIES C_VISIBILITY_PRESET hidden)
set_target_properties(crypto PROPERTIES C_VISIBILITY_PRESET hidden)
Expand Down