[PATCH] D150505: [cmake] Disable GCC lifetime DSE

Xi Ruoyao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 14 00:34:56 PDT 2023


xry111 added a comment.

Wow.  The problem is `clang-tidy` using the `compile_commands.json` file in the build directory as a database for options (because the `trivially-destructible.cpp.tmp.cpp` file is in the build directory).  As `trivially-destructible.cpp.tmp.cpp` is not really in `compile_commands.json`, it uses the options for `tools/llvm-ar/CMakeFiles/llvm-ar.dir/llvm-ar-driver.cpp.o` which is compiled by GCC with `-fno-lifetime-dse`...

I think the solution is using the `-p` option of `clang-tidy` to override the option database, will try...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150505



More information about the llvm-commits mailing list