cmake: tweaks around debug mode and hidden symbols - #15414
Closed
vszakats wants to merge 18 commits into
Closed
Conversation
vszakats
marked this pull request as draft
October 25, 2024 08:47
vszakats
force-pushed
the
msvc-deb-1
branch
2 times, most recently
from
October 25, 2024 15:43
dd16d24 to
b49863d
Compare
vszakats
marked this pull request as ready for review
October 25, 2024 15:49
This reverts commit fe0b313dec4929edb406ad47a9bea99ed4765385. Without this option, MSVC is not export anything, and also doesn't create the implib, so the build fails. https://ci.appveyor.com/project/curlorg/curl/builds/50864143/job/fp642yqsbij5asie
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
- emit warning for `ENABLE_DEBUG` builds. - add words to clarify that `ENABLE_DEBUG` is meant for developing curl itself. - add comment saying `CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON` CMake option may export extra, non-curl symbols. Ref: microsoft/vcpkg#41761 Unexplained exports seen also in curl CI: ``` [ 742] _tcschr [ 743] _tcsncmp [ 744] _tcsncpy [ 745] _tcspbrk ``` https://ci.appveyor.com/project/curlorg/curl/builds/50864041/job/lolledrg4h7hu6e4?fullLog=true#L2160 CMake extracts these symbols from `.obj` files: https://gitlab.kitware.com/cmake/cmake/-/issues/22092#note_943718 I have not found any new MSVC option that helps fixing this without decorating all functions in-source or maintaining a manual list of internal function names used for tests: https://learn.microsoft.com/cpp/build/reference/wholearchive-include-all-library-object-files Closes curl#15414
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
- add 'Shared' to job names where missing. - dedupe setting the default `HTTP_ONLY` env. - fix typo in job name. Cherry-picked from curl#15414 Closes curl#15422
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
emit warning for
ENABLE_DEBUGbuilds.add words to clarify that
ENABLE_DEBUGis meant for developing curlitself.
add comment saying
CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ONCMake option may export extra, non-curl symbols.
Ref: [curl] Debug libraries are incorrectly embedding vsnprintf and other functions microsoft/vcpkg#41761
Unexplained exports seen also in curl CI:
https://ci.appveyor.com/project/curlorg/curl/builds/50864041/job/lolledrg4h7hu6e4?fullLog=true#L2160
CMake extracts these symbols from
.objfiles:https://gitlab.kitware.com/cmake/cmake/-/issues/22092#note_943718
I have not found any new MSVC option that helps fixing this without
decorating all functions in-source or maintaining a manual list of
internal function names used for tests:
https://learn.microsoft.com/cpp/build/reference/wholearchive-include-all-library-object-files