[compiler-rt] [llvm] [compiler-rt][X86] Use functions in cpuid.h instead of inline assembly (PR #97877)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 10:59:36 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `ppc64le-mlir-rhel-clang` running on `ppc64le-mlir-rhel-test` while building `compiler-rt,llvm` at step 5 "build-check-mlir-build-only".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/129/builds/1509

Here is the relevant piece of the build log for the reference:
```
Step 5 (build-check-mlir-build-only) failure: build (failure)
...
8.089 [1350/13/2610] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/Target.cpp.o
8.090 [1350/12/2611] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/TextAPIError.cpp.o
8.090 [1350/11/2612] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/TextStub.cpp.o
8.090 [1350/10/2613] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/TextStubCommon.cpp.o
8.090 [1350/9/2614] Building CXX object lib/TextAPI/CMakeFiles/LLVMTextAPI.dir/Utils.cpp.o
8.091 [1350/8/2615] Building CXX object lib/WindowsDriver/CMakeFiles/LLVMWindowsDriver.dir/MSVCPaths.cpp.o
8.091 [1350/7/2616] Building CXX object tools/mlir/tools/mlir-linalg-ods-gen/CMakeFiles/mlir-linalg-ods-yaml-gen.dir/mlir-linalg-ods-yaml-gen.cpp.o
8.091 [1350/6/2617] Building CXX object tools/llc/CMakeFiles/llc.dir/llc.cpp.o
8.092 [1350/5/2618] Building CXX object tools/llc/CMakeFiles/llc.dir/NewPMDriver.cpp.o
8.834 [1350/4/2619] Building CXX object lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/Host.cpp.o
FAILED: lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/Host.cpp.o 
ccache /home/buildbots/llvm-external-buildbots/clang.16.0.1/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/lib/TargetParser -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/lib/TargetParser -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/Host.cpp.o -MF lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/Host.cpp.o.d -o lib/TargetParser/CMakeFiles/LLVMTargetParser.dir/Host.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/lib/TargetParser/Host.cpp
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/llvm/lib/TargetParser/Host.cpp:54:
/home/buildbots/llvm-external-buildbots/clang.16.0.1/lib/clang/16/include/cpuid.h:14:2: error: this header is for x86 only
#error this header is for x86 only
 ^
/home/buildbots/llvm-external-buildbots/clang.16.0.1/lib/clang/16/include/cpuid.h:298:5: error: invalid output constraint '=a' in asm
    __cpuid(__leaf, __eax, __ebx, __ecx, __edx);
    ^
/home/buildbots/llvm-external-buildbots/clang.16.0.1/lib/clang/16/include/cpuid.h:262:11: note: expanded from macro '__cpuid'
        : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
          ^
/home/buildbots/llvm-external-buildbots/clang.16.0.1/lib/clang/16/include/cpuid.h:313:5: error: invalid output constraint '=a' in asm
    __cpuid(__leaf, *__eax, *__ebx, *__ecx, *__edx);
    ^
/home/buildbots/llvm-external-buildbots/clang.16.0.1/lib/clang/16/include/cpuid.h:262:11: note: expanded from macro '__cpuid'
        : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
          ^
/home/buildbots/llvm-external-buildbots/clang.16.0.1/lib/clang/16/include/cpuid.h:327:5: error: invalid output constraint '=a' in asm
    __cpuid_count(__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
    ^
/home/buildbots/llvm-external-buildbots/clang.16.0.1/lib/clang/16/include/cpuid.h:269:11: note: expanded from macro '__cpuid_count'
        : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
          ^
4 errors generated.
11.285 [1350/3/2620] Building CXX object lib/Object/CMakeFiles/LLVMObject.dir/IRSymtab.cpp.o
16.071 [1350/2/2621] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
22.073 [1350/1/2622] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
ninja: build stopped: subcommand failed.

```

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


More information about the llvm-commits mailing list