[llvm] [CMake][Support] Suppress ml64 assembler logo printing when compiling BLAKE3 on Windows (PR #106794)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 14:12:22 PDT 2024


================
@@ -28,12 +28,18 @@ if (CAN_USE_ASSEMBLER)
     check_symbol_exists(_M_X64 "" IS_X64)
     if (IS_X64)
       enable_language(ASM_MASM)
-      list(APPEND LLVM_BLAKE3_FILES
+      set(LLVM_BLAKE3_ASM_FILES
         blake3_sse2_x86-64_windows_msvc.asm
         blake3_sse41_x86-64_windows_msvc.asm
         blake3_avx2_x86-64_windows_msvc.asm
         blake3_avx512_x86-64_windows_msvc.asm
       )
+      list(APPEND LLVM_BLAKE3_FILES ${LLVM_BLAKE3_ASM_FILES})
+      # Supress the copyright message and 'Assembling...' message.
+      foreach(LLVM_BLAKE3_ASM_FILE ${LLVM_BLAKE3_ASM_FILES})
+        set_source_files_properties(${LLVM_BLAKE3_ASM_FILE}
+          PROPERTIES COMPILE_OPTIONS "/quiet;/nologo")
----------------
mstorsjo wrote:

Unfortunately, these options aren't supported by all tools...

MS ml64.exe only seems to support `/quiet` since MSVC 2022 17.6, while we only require MSVC 2019 16.7 or newer.

The files can also be assembled with `llvm-ml`, and that tool doesn't support the `/quiet` option either.

So either we resort to only `/nologo`, which does reduce the verbosity a bit here, even if not entirely, or we add a configure time check for whether `/quiet` is supported by the `CMAKE_ASM_MASK_COMPILER` tool.

https://github.com/llvm/llvm-project/pull/106794


More information about the llvm-commits mailing list