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

Matt Bolitho via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 13:57:45 PDT 2024


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

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
```

>From 1b06d64d88c5fc52ceff3095e4e3eac1dcea0e73 Mon Sep 17 00:00:00 2001
From: Matt Bolitho <matt.bolitho.software at gmail.com>
Date: Fri, 30 Aug 2024 20:54:10 +0100
Subject: [PATCH] [CMake] Suppresses ml64 printing

---
 llvm/lib/Support/BLAKE3/CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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()



More information about the llvm-commits mailing list