[llvm] acd64d8 - [Support/BLAKE3] CMake: Check for `IS_X64` or `CMAKE_OSX_ARCHITECTURES` before adding the assembly files
Argyrios Kyrtzidis via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 09:48:16 PDT 2022
Author: Argyrios Kyrtzidis
Date: 2022-06-21T09:48:07-07:00
New Revision: acd64d8e85f69467c64af833ef6b38b807bd9b4b
URL: https://github.com/llvm/llvm-project/commit/acd64d8e85f69467c64af833ef6b38b807bd9b4b
DIFF: https://github.com/llvm/llvm-project/commit/acd64d8e85f69467c64af833ef6b38b807bd9b4b.diff
LOG: [Support/BLAKE3] CMake: Check for `IS_X64` or `CMAKE_OSX_ARCHITECTURES` before adding the assembly files
This should fix `clang-ppc64-aix` builder (https://lab.llvm.org/buildbot/#/builders/214)
Added:
Modified:
llvm/lib/Support/BLAKE3/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/lib/Support/BLAKE3/CMakeLists.txt b/llvm/lib/Support/BLAKE3/CMakeLists.txt
index df1805918587..4fd60a99bbfb 100644
--- a/llvm/lib/Support/BLAKE3/CMakeLists.txt
+++ b/llvm/lib/Support/BLAKE3/CMakeLists.txt
@@ -53,12 +53,8 @@ if (CAN_USE_ASSEMBLER)
disable_blake3_x86_simd()
endif()
else()
- check_symbol_exists(__i386__ "" IS_X32)
- if (IS_X32)
- # blake3 C code autoenables SIMD for i386, but those implementations are
- # only available via the intrinsics sources which we don't enable here.
- disable_blake3_x86_simd()
- else()
+ check_symbol_exists(__x86_64__ "" IS_X64)
+ if (IS_X64 OR CMAKE_OSX_ARCHITECTURES)
# In a macOS Universal build (setting CMAKE_OSX_ARCHITECTURES to multiple
# values), compilation of the source files will target multiple architectures
# (each source file is internally compiled once for each architecture).
@@ -70,13 +66,11 @@ if (CAN_USE_ASSEMBLER)
blake3_avx2_x86-64_unix.S
blake3_avx512_x86-64_unix.S
)
- check_c_compiler_flag("-mavx512vl" SUPPORTS_avx512vl)
- if (SUPPORTS_avx512vl)
- # Clang-6 needs this flag. We also suppress '-Wunused-command-line-argument'
- # in case the file is included with arm architecture.
- set_source_files_properties(blake3_avx512_x86-64_unix.S
- PROPERTIES COMPILE_OPTIONS "-mavx512vl;-Wno-unused-command-line-argument")
- endif()
+ # Clang-6 needs this flag.
+ set_source_files_properties(blake3_avx512_x86-64_windows_gnu.S
+ PROPERTIES COMPILE_OPTIONS "-mavx512vl")
+ else()
+ disable_blake3_x86_simd()
endif()
endif()
else()
More information about the llvm-commits
mailing list