-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Comparing changes
Open a pull request
base repository: jemalloc/jemalloc
base: dev
head repository: mattsta/jemalloc
compare: add/cmake-2019
- 7 commits
- 14 files changed
- 1 contributor
Commits on May 30, 2019
-
Add CMake build infrastructure
This implements CMake infrastrucutre in preparation for jemalloc 5.2.0 CMake build supports features from configure.ac: - automatic symbol extraction (je_ and jet_) - auto-generate awk formatting files - build all objects with -DJEMALLOC_NO_PRIVATE_NAMESPACE - run nm -a against object files and pipe through awk - output private header files - platform feature detection - tests adapted from configure.ac into CMake check_c_source_runs() - header generation from .h.in to .h based on config-discovered features - 4-way building - generate je_ objects with symbols exposed - generate je_ objects for building - generate jet_ objects with symbols exposed - generate jet_ objects for building - make test (currently only exposed when CMake release is Debug) - C++14 wrapper built and included in library by default - this means CMake recognizes libjemalloc.{a,so,dylib} as a C++ library and any projects using it will be linked with C++ - the configure option JEMALLOC_CXX_DISABLE can disable including the C++ wrapper which will cause CMake to see jemalloc as a C-only library again - per-OS feature flags - user configuration options (the old ./configure --[opt] settings) - many options implemented, but not all yet - and the implemented options haven't all been tested either - options can be edited after configuration with `make edit_cache` - but may require a clean build/ directory because we aren't regenerating feature headers on each post-config-config update Featues unique to this CMake build infrastructure: - complete out-of-source builds - all headers and supporting artifacts are generated in build/ - mkdir build; cd build; cmake ..; make -j4 - no "make distclean" required to remove build cruft - just `rm -rf build/` and you have a 100% clean checkout again - better build system organization: - compiler detection: build-aux/DetectCompilerFeatures.cmake - OS detection: build-aux/DetectOSFeatures.cmake - exposed config options: build-aux/UserCompileOptions.cmake Features ignored or not complete right now: - installing - doc building - shell wrapper creation (bin/jemalloc.sh, etc) - dual building of pic and non-pic objects/archives - windows build support - proper library-wide mangle of override functions - refactoring the original jemalloc-cmake approach to tests - it works currently, but the CMake directives are convoluted in places History: This original CMake conversion started by using CMake files from jemalloc/jemalloc-cmake, but (for some reason?) the jemalloc-cmake repository is actually a windows-only CMake port. Also, the git history there is so outdated and polluted we can't use commits from it against the live jemalloc/jemalloc repository. Those intial CMake conversion scripts were a useful starting point though. For re-CMaking inspiration, I started with the CMake files from: jemalloc/jemalloc-cmake as of 88c2dc8 Thu Dec 15 16:26:43 2016 -0800 and fixed it to build on non-windows platforms (while removing some of the windows-only operations and other irrelevant behaviors since they can't easily be tested (or even run?) on other platforms). The initial jemalloc-cmake infrastructure had a lot of useful utilities for building CMake, translating autoconf includes, and finding system properties. I kept most of those in place and they saved much trial-and-error shuffling around trying to get output text files formatted properly. If Windows support is desired again, support should be added to this CMake deployment revision instead of the abandoned jemalloc/jemalloc-cmake.Configuration menu - View commit details
-
Copy full SHA for 7afd546 - Browse repository at this point
Copy the full SHA 7afd546View commit details -
fixup! Add CMake build infrastructure
When merging, this commit should be squashed into the previous commit since they all form one logical commit: git rebase -i --autosquash origin/dev This commit contains only fixes to the previous commit.
Configuration menu - View commit details
-
Copy full SHA for 3fa03a2 - Browse repository at this point
Copy the full SHA 3fa03a2View commit details -
fixup! Add CMake build infrastructure
Multi-purpose bulk commit to rebase into the final merge: - greatly improves proper rebuilding of generated files based on when their underlying dependencies or assumptions (.git modifications) change - improves reliability of private header generation - attempted (and failed, but left notes about) moving symbol extraction from an one-for-all approach to a one-for-one approach, but CMake is fighting us on a clean solution. (the simplest solution at this point would be to disable the COMMENT blocks on the custom symbol and header generation commands so they don't clutter output and can run whenever they need to run) - removed some other legacy jemalloc cmake attempts from years ago - improved private namespace user config options - various refactoring, logic cleanup, and more explicit comments
Configuration menu - View commit details
-
Copy full SHA for 1ff24ed - Browse repository at this point
Copy the full SHA 1ff24edView commit details -
fixup! Add CMake build infrastructure
Improve test target names so they don't conflict when being included in other projects (generic names like 'stats' and 'zero' have a high chance of conflicting with other projects). Also improves overall test organization (direct names everywhere instead of unnecessarily templated variables) plus test creation through reusing a function instead of having copy/pasted test creation in five directories.
Configuration menu - View commit details
-
Copy full SHA for 5484be3 - Browse repository at this point
Copy the full SHA 5484be3View commit details -
fixup! Add CMake build infrastructure
Adds CMake options to enable/disable STATIC and SHARED libraries as a user preference. Also fixes some dependency logic around awk creation.
Configuration menu - View commit details
-
Copy full SHA for 4130a93 - Browse repository at this point
Copy the full SHA 4130a93View commit details -
fixup! Add CMake build infrastructure
Add new test broken out from unit/mallctl.c into unit/extent_util.c
Configuration menu - View commit details
-
Copy full SHA for 13de138 - Browse repository at this point
Copy the full SHA 13de138View commit details -
fixup! Add CMake build infrastructure
Cleanup some style issues and a bad copy/paste comment from previously splitting out functionality into two files.
Configuration menu - View commit details
-
Copy full SHA for dc3cde5 - Browse repository at this point
Copy the full SHA dc3cde5View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff dev...add/cmake-2019