[Lldb-commits] [clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-06-03 Thread Chris Apple via lldb-commits

cjappl wrote:

Hi @Endilll 

I did a git bisect that pointed to this change as the one blocking my 
compilation on an Ubuntu docker image with clang 14.0

The error I see:

```
CMake Error at 
/test_radsan/llvm-project/compiler-rt/cmake/Modules/CheckSectionExists.cmake:72 
(message):
  cc: error: unrecognized command-line option
  '-Wcovered-switch-default'; did you mean
  '-Wno-switch-default'?

  cc: error: unrecognized command-line option
  '-Wstring-conversion'; did you mean
  '-Wsign-conversion'?

Call Stack (most recent call first):
  /test_radsan/llvm-project/compiler-rt/lib/builtins/CMakeLists.txt:923 
(check_section_exists)
```

My compiler info, printed from CMake:
```
  CMAKE_CXX_COMPILER_VERSION: 14.0.0
  CMAKE_CXX_COMPILER_ID: Clang
```

More info from the command line:
```
$ clang --version
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ uname -a
Linux 18728bf50582 6.5.11-linuxkit #1 SMP PREEMPT Mon Dec  4 11:30:00 UTC 2023 
aarch64 aarch64 aarch64 GNU/Linux
$ cmake --version
cmake version 3.22.1
```

Let me know what other information may be helpful, or if this is user error. It 
seems from your godbolt links above, clang 5.0 and higher should work, so I'm 
surprised that 14.0 is dying in this environment

https://github.com/llvm/llvm-project/pull/92953
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-06-03 Thread Chris Apple via lldb-commits

cjappl wrote:

Thanks for your help! You were correct that cc was pointing to gcc. This is 
fixed when I updated my machine to use my known clang as the default compiler.

For future archeologists, this meant (from [this 
answer](https://askubuntu.com/questions/1198087/how-to-set-clang-9-as-the-default-c-compiler-on-ubuntu-19-10))

```
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 60
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 60
```

https://github.com/llvm/llvm-project/pull/92953
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits