[compiler-rt] [llvm] [LLVM][compiler-rt] Fix build with LLVM_USE_SANITIZER=Undefined (PR #120006)

Dmitry Chestnykh via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 15 07:19:33 PST 2024


chestnykh wrote:

But gn asserts that host compiler is clang:
```
  if (use_ubsan) {
    assert(is_clang && (current_os == "ios" || current_os == "linux" ||
                            current_os == "mac"),
           "ubsan only supported on iOS/Clang, Linux/Clang, or macOS/Clang")
    cflags += [
      "-fsanitize=undefined",
      "-fno-sanitize=vptr,function",
      "-fno-sanitize-recover=all",
    ]
    ldflags += [ "-fsanitize=undefined" ]
  }

```
So probably this PR is not needed and only in the documentation it is necessary to clearly indicate that the compiler should be clang if LLVM_USE_SANITIZER is not empty

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


More information about the llvm-commits mailing list