[libcxx-commits] [PATCH] D124377: [runtimes] [CMake] Fix checks for -Werror when building with incomplete toolchains
Petr Hosek via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 25 14:25:37 PDT 2022
phosek accepted this revision.
phosek added a comment.
LGTM
================
Comment at: runtimes/CMakeLists.txt:105
if (CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG)
+ set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} --unwindlib=none")
----------------
This is a minor nit, but it'd be nice to have a naming convention for this pattern. I did a quick search and found various different instances, like `ORIG_<name>`, `<name>_ORIG`, `SAVED_<name>`, `__SAVED_<name>`. The last one, `__SAVED_<name>` is the one I'd prefer. It's already used in CMake's own modules and I think it's best at signaling that this is an internal variable that has a specific purpose.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124377/new/
https://reviews.llvm.org/D124377
More information about the libcxx-commits
mailing list