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

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 13:58:35 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Matt Bolitho (MattBolitho)

<details>
<summary>Changes</summary>

Suppresses this extraneous `ml64` output (assembling... and logo) when compiling BLAKE3 assembly sources with MSVC and Ninja on Windows:

```
[157/3758] Building ASM_MASM object lib\Support\BLAKE3\CMa...upportBlake3.dir\blake3_avx512_x86-64_windows_msvc.asm.obj
Microsoft (R) Macro Assembler (x64) Version 14.41.34120.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Assembling: C:\path\to\llvm-project\llvm\lib\Support\BLAKE3\blake3_avx512_x86-64_windows_msvc.asm
```

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


1 Files Affected:

- (modified) llvm/lib/Support/BLAKE3/CMakeLists.txt (+7-1) 


``````````diff
diff --git a/llvm/lib/Support/BLAKE3/CMakeLists.txt b/llvm/lib/Support/BLAKE3/CMakeLists.txt
index 51317b8048f76f..7e5352208ddcbd 100644
--- a/llvm/lib/Support/BLAKE3/CMakeLists.txt
+++ b/llvm/lib/Support/BLAKE3/CMakeLists.txt
@@ -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")
+      endforeach()
     else()
       disable_blake3_x86_simd()
     endif()

``````````

</details>


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


More information about the llvm-commits mailing list