mirror of
https://github.com/DynamoRIO/dynamorio.git
synced 2026-10-12 02:02:04 +00:00
This PR is a follow up on #8169. Instead of hardcoding the kernel module object file list, we are reusing existing `CORE_SRCS` and `ARCH_SRCS` to generate the object file list. Overall, the current process is easier to maintain and less error prone. It's also easier to replicate in a different build system. The trade-offs are there are some files we don't actually need getting pulled in, so the build time is slightly longer (<10s longer) and the built `.ko` file is slightly larger (~130KB larger with DEBUG ON, ~20KB larger with DEBUG OFF). - Use existing `CORE_SRCS` and `ARCH_SRCS` defined in `core/CMakeLists.txt` for kernel module object file list generation. - Prevent `emit_utils.c` from being included in `ARCH_SRCS` twice when `ARCH_NAME` and `ARCH_NAME_SHARED` are the same in `core/CMakeLists.txt`. This isn't a bug per se: both CMake and kbuild can handle duplicate files. I just thought this would be cleaner and less confusing. - Disable annotations (by `undef ANNOTATIONS`) in `configure.cmake.h`. - Use `limits_wrapper.h` in `core/hotpatch.c`. - Remove redundant `lib/dr_annotations.h` in `core/jit_opt.c`. Issue: #8021