[PATCH] D103386: [PowerPC] Fix x86 vector intrinsics wrapper compilation under C++

Qiu Chaofan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 2 21:51:31 PDT 2021


qiucf added inline comments.


================
Comment at: clang/test/CodeGen/ppc-xmmintrin.c:10
 // RUN:   -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt -n | FileCheck %s --check-prefixes=CHECK,CHECK-LE
+// RUN: %clang -x c++ -fsyntax-only -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS %s \
+// RUN:   -fno-discard-value-names -mllvm -disable-llvm-optzns
----------------
bjope wrote:
> Unfortunately I get some failures with this. Maybe because of an unstandard build setup.
> 
> We've started to use `-DCLANG_DEFAULT_RTLIB=compiler-rt -DCLANG_DEFAULT_CXX_STDLIB=libc++` when building clang. And we also use `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON`. Not sure if that is a setup that is asking for trouble. Anyway, when running this test case we end up with
> 
> ```
> : 'RUN: at line 10';   /workspace/llvm/build/bin/clang -x c++ -fsyntax-only -target powerpc64le-unknown-linux-gnu -mcpu=pwr8 -ffreestanding -DNO_WARN_X86_INTRINSICS /workspace/clang/test/CodeGen/ppc-xmmintrin.c    -fno-discard-value-names -mllvm -disable-llvm-optzns
> --
> Exit Code: 1
> 
> Command Output (stderr):
> --
> In file included from /workspace/clang/test/CodeGen/ppc-xmmintrin.c:13:
> In file included from /workspace/llvm/build/lib/clang/13.0.0/include/ppc_wrappers/xmmintrin.h:42:
> In file included from /workspace/llvm/build/lib/clang/13.0.0/include/altivec.h:44:
> In file included from /workspace/llvm/build/bin/../include/c++/v1/stddef.h:39:
> /workspace/llvm/build/bin/../include/c++/v1/__config:13:10: fatal error: '__config_site' file not found
> #include <__config_site>
>          ^~~~~~~~~~~~~~~
> 1 error generated.
> ```
> 
> Not sure really how to solve that.
> 
> Maybe we should stop building like that?
> 
> Or there is a bug somewhere (such as that we only get the __config_site headers in target specific dirs for targets that we actually build runtimes for, maybe something that was missing in https://reviews.llvm.org/D97572)?
> (Maybe @phosek  could comment on that?)
> 
> Or this test case is missing some options to make it a bit more independent on the runtimes build setup?
> 
The tests relies on some system stuff. Is the failure related to this change? (or exposed by `-x c++` option?)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103386/new/

https://reviews.llvm.org/D103386



More information about the cfe-commits mailing list