[CMake] Remove CLANG_DEFAULT_STD_C/CLANG_DEFAULT_STD_CXX
authorFangrui Song <i@maskray.me>
Sun, 16 Oct 2022 20:15:44 +0000 (13:15 -0700)
committerFangrui Song <i@maskray.me>
Sun, 16 Oct 2022 20:15:44 +0000 (13:15 -0700)
commit3baadff896eddfa09fcd458d120bac95491992a7
tree24ec24af6b24f8495dfdd8775ff73ff81cd88aad
parentdc884f0f4354164e06cdcd30b56fd88dff2b382f
[CMake] Remove CLANG_DEFAULT_STD_C/CLANG_DEFAULT_STD_CXX

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 has been satisfied by a configuration file.

Reviewed By: mgorny

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