[llvm] 3fdc3d6 - [gn build] (manually) port a7691dee2d3c (TestAST)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 18:37:56 PDT 2022


Author: Nico Weber
Date: 2022-04-21T21:37:48-04:00
New Revision: 3fdc3d63f67e9e32be14a608965690f5370fcb56

URL: https://github.com/llvm/llvm-project/commit/3fdc3d63f67e9e32be14a608965690f5370fcb56
DIFF: https://github.com/llvm/llvm-project/commit/3fdc3d63f67e9e32be14a608965690f5370fcb56.diff

LOG: [gn build] (manually) port a7691dee2d3c (TestAST)

This makes clang/lib/Testing the very first non-test()-target that includes
gtest headers, which means it needs an explicit dep on gtest.

Added: 
    

Modified: 
    llvm/utils/gn/secondary/clang/lib/Testing/BUILD.gn
    llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/clang/lib/Testing/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/Testing/BUILD.gn
index 2d050154f3e85..00cb4645a4c0a 100644
--- a/llvm/utils/gn/secondary/clang/lib/Testing/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/lib/Testing/BUILD.gn
@@ -1,6 +1,14 @@
 static_library("Testing") {
   output_name = "clangTesting"
   configs += [ "//llvm/utils/gn/build:clang_code" ]
-  deps = [ "//llvm/lib/Support" ]
-  sources = [ "CommandLineArgs.cpp" ]
+  testonly = true
+  deps = [
+    "//clang/lib/Basic",
+    "//llvm/lib/Support",
+    "//llvm/utils/unittest:gtest",
+  ]
+  sources = [
+    "CommandLineArgs.cpp",
+    "TestAST.cpp",
+  ]
 }

diff  --git a/llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn b/llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn
index 4269ed6d69cc2..7cab8a0982b14 100644
--- a/llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn
@@ -11,6 +11,7 @@ unittest("ToolingTests") {
     "//clang/lib/Frontend",
     "//clang/lib/Lex",
     "//clang/lib/Rewrite",
+    "//clang/lib/Testing",
     "//clang/lib/Tooling",
     "//clang/lib/Tooling/Core",
     "//clang/lib/Tooling/DependencyScanning",


        


More information about the llvm-commits mailing list