bangtianliu wrote:

> @bangtianliu I mean a cmake command line invocation. BUILD_SHARED_LIBS is off 
> by default. I can't reproduce a similar error on my system with Clang or GCC.

 I successfully reproduced the visibility error. The key is using Clang-14.
 
 ``` shell
   cmake -GNinja -B build -S llvm \
    -DCMAKE_C_COMPILER=/usr/bin/clang \      # Must be clang-14
    -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \  # Must be clang++-14
    -DLLVM_TARGETS_TO_BUILD="X86;AArch64" \
    -DBUILD_SHARED_LIBS=OFF \
    -DCMAKE_BUILD_TYPE=Release
 ```
 
 ```shell
  # Build a Target library (triggers the error)
  ninja lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86AsmPrinter.cpp.o
```


https://github.com/llvm/llvm-project/pull/176420
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to