Commit da57e63
committed
Sync build configuration with Memray
- 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>1 parent 4d4ef00 commit da57e63
2 files changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
11 | 26 | | |
12 | 27 | | |
13 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
78 | | - | |
79 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
0 commit comments