Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 607 by clwal...@
gmail.com: libwebp fails to build with clang/LLVM for Windows
https://bugs.chromium.org/p/webp/issues/detail?id=607When trying to compile libwebp with clang/LLVM for Windows 15.0.1, it fails to build.
The issue is that the CPUID detection logic in dsp\dsp.c doesn't build correctly for this scenario and you get a link failure with a duplicate symbol for VP8GetCPUInfo.
Even if it built correctly, however, the detection wouldn't be right. For clang/LLVM for Windows, the intrinsic you want to use is in cpuid.h and has a slightly different syntax than the intrin.h one that's MSVC specific.
#if defined(__clang__) || defined(__GNUC__)
#include <cpuid.h>
#include <x86intrin.h>
// Replace the MSVC syntax __cpuid(info, fn) with __cpuid(fn, info[0], info[1], info[2], info[3])
// Replace the MSVC syntax __cpuidex(info, fn, sfn) with __cpuid_count(fn, sfn, info[0], info[1], info[2], info[3])
--
You received this message because:
1. The project was configured to send all issue notifications to this address
You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings