Skip to content

Add ability to strip binaries in cmake#35196

Merged
Felixoid merged 4 commits intomasterfrom
add_strip_cmake_cmd
Mar 11, 2022
Merged

Add ability to strip binaries in cmake#35196
Felixoid merged 4 commits intomasterfrom
add_strip_cmake_cmd

Conversation

@alesapin
Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add an ability to build stripped binaries with cmake.

@robot-clickhouse robot-clickhouse added the pr-build Pull request with build/testing/packaging improvement label Mar 10, 2022
message (FATAL_ERROR "Cannot find objcopy.")
endif ()

if (COMPILER_GCC)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

copypaste

OBJCOPY_PATH=${3:objcopy}
READELF_PATH=${4:readelf}

BUILD_ID=$($READELF_PATH -n $1 | sed -n '/Build ID/ { s/.*: //p; q; }')
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Now in some cases our build system depend on bash.

endif ()

# Allows to build stripped binary in a separate directory
if (OBJCOPY_PATH AND READELF_PATH)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Figured it out in slack

@Felixoid
Copy link
Copy Markdown
Member

The fuzzer's issue is created, merge it now #35210

@Felixoid Felixoid merged commit 91f1857 into master Mar 11, 2022
@Felixoid Felixoid deleted the add_strip_cmake_cmd branch March 11, 2022 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-build Pull request with build/testing/packaging improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants