[PATCH] D133375: [CMake] Remove CLANG_DEFAULT_STD_C/CLANG_DEFAULT_STD_CXX

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 6 13:29:20 PDT 2022


MaskRay created this revision.
MaskRay added reviewers: aaron.ballman, mgorny, thesamesam.
Herald added a subscriber: StephenFan.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

When Clang is used as a cross compiler, it should respect the target
platform default. Defaulting to a configure-time CLANG_DEFAULT_STD_C/CLANG_DEFAULT_STD_CXX
does not make much sense.

When Clang is used as a single-platform compiler, we should use Clang
configuration file (https://discourse.llvm.org/t/configuration-files/42529
https://clang.llvm.org/docs/UsersManual.html#configuration-files).

The Gentoo needs from D34365 <https://reviews.llvm.org/D34365> is exactly the scenario designed to be
solved by a configuration file. See
https://github.com/llvm/llvm-project/issues/57570 for detail about using
`${triple}-clang`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133375

Files:
  clang/CMakeLists.txt
  clang/include/clang/Config/config.h.cmake
  clang/lib/Basic/LangStandards.cpp
  clang/test/Preprocessor/lang-std.cpp
  clang/test/lit.site.cfg.py.in
  llvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn
  utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133375.458261.patch
Type: text/x-patch
Size: 5452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220906/a6f00f62/attachment.bin>


More information about the cfe-commits mailing list