From e805c52ecf4bf32921f8be0cb5969b37b3e89538 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Fri, 28 Jun 2024 08:16:33 -0400 Subject: [PATCH] Improve build comments and messaging --- CMakeLists.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index efeefc040f1..b49943f36c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -289,23 +289,26 @@ endmacro() # can be set to handle such cases. option(MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX "Exclude AVX code from the build" OFF) -# Some assemblers know about AVX but not AVX512 instructions, e.g. gcc 4.8.2. +# Some assemblers know about AVX but not ADX, AVX2 or AVX512 instructions, e.g. gcc 4.8.2. # This flag can be set to handle such cases. -# Note that the flag's name has "512AVX" instead of "AVX512" so that it doesn't -# include the entire flag -DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX and match it -# in the Perl files checks. +# Note: +# * Although this flag name implies an effect on AVX512 instructions, it's also +# intended to avoid generating ADX and AVX2 instructions. +# * This flag name has "512AVX" instead of "AVX512" so that it doesn't +# include the entire flag -DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX and match +# to it in the Perl files checks. option(MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX "Exclude AVX512 code from the build" OFF) if(MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX) add_definitions(-DMY_ASSEMBLER_IS_TOO_OLD_FOR_AVX) add_definitions(-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX) set(MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX ON) - message(STATUS "MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX selected, removing AVX optimisations") + message(STATUS "MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX selected, removing all AVX optimisations") endif() if(MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX) add_definitions(-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX) - message(STATUS "MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX selected, removing AVX512 optimisations") + message(STATUS "MY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX selected, removing ADX, AVX2 and AVX512 optimisations") endif() if (GCC)