Index: llvm/trunk/utils/gn/secondary/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/BUILD.gn +++ llvm/trunk/utils/gn/secondary/BUILD.gn @@ -1,11 +1,6 @@ group("default") { deps = [ - "//clang/lib/AST", - "//clang/lib/Analysis", - "//clang/lib/Basic", - "//clang/lib/Edit", - "//clang/lib/Lex", - "//clang/lib/Sema", + "//clang/tools/clang-format", "//lld/test", "//llvm/tools/llvm-undname", ] Index: llvm/trunk/utils/gn/secondary/clang/lib/Format/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang/lib/Format/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang/lib/Format/BUILD.gn @@ -0,0 +1,27 @@ +static_library("Format") { + output_name = "clangFormat" + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Tooling/Core", + "//clang/lib/Tooling/Inclusions", + "//llvm/lib/Support", + ] + sources = [ + "AffectedRangeManager.cpp", + "BreakableToken.cpp", + "ContinuationIndenter.cpp", + "Format.cpp", + "FormatToken.cpp", + "FormatTokenLexer.cpp", + "NamespaceEndCommentsFixer.cpp", + "SortJavaScriptImports.cpp", + "TokenAnalyzer.cpp", + "TokenAnnotator.cpp", + "UnwrappedLineFormatter.cpp", + "UnwrappedLineParser.cpp", + "UsingDeclarationsSorter.cpp", + "WhitespaceManager.cpp", + ] +} Index: llvm/trunk/utils/gn/secondary/clang/lib/Rewrite/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang/lib/Rewrite/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang/lib/Rewrite/BUILD.gn @@ -0,0 +1,16 @@ +static_library("Rewrite") { + output_name = "clangRewrite" + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/Basic", + "//clang/lib/Lex", + "//llvm/lib/Support", + ] + sources = [ + "DeltaTree.cpp", + "HTMLRewrite.cpp", + "RewriteRope.cpp", + "Rewriter.cpp", + "TokenRewriter.cpp", + ] +} Index: llvm/trunk/utils/gn/secondary/clang/lib/Tooling/Core/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang/lib/Tooling/Core/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang/lib/Tooling/Core/BUILD.gn @@ -0,0 +1,16 @@ +static_library("Core") { + output_name = "clangToolingCore" + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/AST", + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Rewrite", + "//llvm/lib/Support", + ] + sources = [ + "Diagnostic.cpp", + "Lookup.cpp", + "Replacement.cpp", + ] +} Index: llvm/trunk/utils/gn/secondary/clang/lib/Tooling/Inclusions/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang/lib/Tooling/Inclusions/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang/lib/Tooling/Inclusions/BUILD.gn @@ -0,0 +1,15 @@ +static_library("Inclusions") { + output_name = "clangToolingInclusions" + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/Basic", + "//clang/lib/Lex", + "//clang/lib/Rewrite", + "//clang/lib/Tooling/Core", + "//llvm/lib/Support", + ] + sources = [ + "HeaderIncludes.cpp", + "IncludeStyle.cpp", + ] +} Index: llvm/trunk/utils/gn/secondary/clang/tools/clang-format/BUILD.gn =================================================================== --- llvm/trunk/utils/gn/secondary/clang/tools/clang-format/BUILD.gn +++ llvm/trunk/utils/gn/secondary/clang/tools/clang-format/BUILD.gn @@ -0,0 +1,13 @@ +executable("clang-format") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/Basic", + "//clang/lib/Format", + "//clang/lib/Rewrite", + "//clang/lib/Tooling/Core", + "//llvm/lib/Support", + ] + sources = [ + "ClangFormat.cpp", + ] +}