Sync build configuration with Memray#330
Merged
godlygeek merged 2 commits intoJul 12, 2026
Merged
Conversation
pablogsal
approved these changes
Jul 11, 2026
- Start setting `CMAKE_CXX_VISIBILITY_PRESET` to `hidden` to avoid unintentionally exposing symbols from our extension module that could potentially conflict with other modules. - Ensure that directories searched for shared libraries are added to the RPATH with `CMAKE_INSTALL_RPATH_USE_LINK_PATH`. - Ensure that the Python version we find includes a configuration for building extension modules that against the stable ABI. - Build with -Wall to enable extra warnings. - Pass `-D_FILE_OFFSET_BITS=64` to opt into 64-bit file IO APIs even on 32-bit platforms. This currently doesn't have any effect, since we only build for 64-bit platforms, but it would be needed if we ever added i686 support, and matching Memray will make maintenance cheaper. - Enable extra debugging in the C++ STL for debug builds. - Build with link time optimizations enabled for CMake release mode builds. - Optimize for debugging in CMake debug builds. - Require `scikit-build-core` 0.9 or newer. - Enable extra logging during builds. - Avoid stripping debug info from the built extension module. - Automatically build in debug mode rather than release mode when passing the `-e` / `--editable` flag to `pip install`. Signed-off-by: Matt Wozniski <godlygeek@gmail.com>
756868a to
5e2a46e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #330 +/- ##
==========================================
- Coverage 77.93% 77.63% -0.30%
==========================================
Files 56 57 +1
Lines 5988 6601 +613
Branches 631 628 -3
==========================================
+ Hits 4667 5125 +458
- Misses 1321 1476 +155
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This function is exposed by our extension module, but never used by any of our Python modules. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
4749ad7 to
7f15501
Compare
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.
Remove some unnecessary differences between PyStack's and Memray's CMake and
scikit-build-coreconfigurations.CMAKE_CXX_VISIBILITY_PRESETtohiddento avoid unintentionally exposing symbols from our extension module that could potentially conflict with other modules.CMAKE_INSTALL_RPATH_USE_LINK_PATH.-D_FILE_OFFSET_BITS=64to opt into 64-bit file IO APIs even on 32-bit platforms. This currently doesn't have any effect, since we only build for 64-bit platforms, but it would be needed if we ever added i686 support, and matching Memray will make maintenance cheaper.scikit-build-core0.9 or newer.-e/--editableflag topip install.