================ @@ -0,0 +1,24 @@ +//===- clang/unittests/AllClangUnitTests.cpp ------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/TargetSelect.h" +#include "gtest/gtest.h" + +// This custom main entry point for the AllClangUnitTests binary registers all +// tests on startup, so the tests don't become sensitive to target registration +// within the test suite. +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + llvm::cl::ParseCommandLineOptions(argc, argv); + + llvm::InitializeAllTargets(); ---------------- rnk wrote:
Done, sorry, I copied this from [`driver.cpp`](https://github.com/llvm/llvm-project/blob/main/clang/tools/driver/driver.cpp#L246), so I didn't get all this goop. https://github.com/llvm/llvm-project/pull/144428 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits