1
0
mirror of https://github.com/google/cpu_features.git synced 2025-06-30 21:02:34 +02:00

[NFC] Generate separate tables via macro (#137)

This is a non functional change, it allows:
 - Getting rid of `unix_features_aggregator`
 - Have a single blob describing the features
 - Fix wrong mocking of `hwcaps`

Downside: abuse of macros makes the code slightly magical and harder to understand.
It think it's still an improvement over the current situation as there's less repetition and less chances to get something wrong.
This commit is contained in:
Guillaume Chatelet
2020-10-12 11:50:35 +02:00
committed by GitHub
parent 3cc8f310d9
commit 9a8f04b24c
18 changed files with 472 additions and 803 deletions

View File

@ -114,9 +114,7 @@ setup_include_and_definitions(utils)
if(UNIX)
add_library(unix_based_hardware_detection OBJECT
${PROJECT_SOURCE_DIR}/include/internal/hwcaps.h
${PROJECT_SOURCE_DIR}/include/internal/unix_features_aggregator.h
${PROJECT_SOURCE_DIR}/src/hwcaps.c
${PROJECT_SOURCE_DIR}/src/unix_features_aggregator.c
)
setup_include_and_definitions(unix_based_hardware_detection)
check_include_file(dlfcn.h HAVE_DLFCN_H)