Index: llvm/utils/gn/secondary/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/BUILD.gn +++ llvm/utils/gn/secondary/BUILD.gn @@ -4,7 +4,10 @@ "//clang/tools/clang-diff", "//clang/tools/clang-format", "//clang/tools/clang-import-test", + "//clang/tools/clang-refactor", + "//clang/tools/clang-rename", "//clang/tools/diagtool", + "//clang/utils/hmaptool", "//lld/test", "//llvm/tools/llvm-cat", "//llvm/tools/llvm-lto", Index: llvm/utils/gn/secondary/clang/lib/Tooling/Refactoring/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang/lib/Tooling/Refactoring/BUILD.gn @@ -0,0 +1,29 @@ +static_library("Refactoring") { + output_name = "clangToolingRefactor" + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/AST", + "//clang/lib/ASTMatchers", + "//clang/lib/Basic", + "//clang/lib/Format", + "//clang/lib/Index", + "//clang/lib/Lex", + "//clang/lib/Rewrite", + "//clang/lib/Tooling/Core", + "//llvm/lib/Support", + ] + include_dirs = [ "." ] + sources = [ + "ASTSelection.cpp", + "ASTSelectionRequirements.cpp", + "AtomicChange.cpp", + "Extract/Extract.cpp", + "Extract/SourceExtraction.cpp", + "RefactoringActions.cpp", + "Rename/RenamingAction.cpp", + "Rename/SymbolOccurrences.cpp", + "Rename/USRFinder.cpp", + "Rename/USRFindingAction.cpp", + "Rename/USRLocFinder.cpp", + ] +} Index: llvm/utils/gn/secondary/clang/tools/clang-refactor/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang/tools/clang-refactor/BUILD.gn @@ -0,0 +1,19 @@ +executable("clang-refactor") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/AST", + "//clang/lib/Basic", + "//clang/lib/Format", + "//clang/lib/Frontend", + "//clang/lib/Lex", + "//clang/lib/Rewrite", + "//clang/lib/Tooling", + "//clang/lib/Tooling/Refactoring", + "//llvm/lib/Option", + "//llvm/lib/Support", + ] + sources = [ + "ClangRefactor.cpp", + "TestSupport.cpp", + ] +} Index: llvm/utils/gn/secondary/clang/tools/clang-rename/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang/tools/clang-rename/BUILD.gn @@ -0,0 +1,16 @@ +executable("clang-rename") { + configs += [ "//llvm/utils/gn/build:clang_code" ] + deps = [ + "//clang/lib/Basic", + "//clang/lib/Frontend", + "//clang/lib/Rewrite", + "//clang/lib/Tooling", + "//clang/lib/Tooling/Core", + "//clang/lib/Tooling/Refactoring", + "//llvm/lib/Option", + "//llvm/lib/Support", + ] + sources = [ + "ClangRename.cpp", + ] +} Index: llvm/utils/gn/secondary/clang/utils/hmaptool/BUILD.gn =================================================================== --- /dev/null +++ llvm/utils/gn/secondary/clang/utils/hmaptool/BUILD.gn @@ -0,0 +1,8 @@ +copy("hmaptool") { + sources = [ + "hmaptool", + ] + outputs = [ + "$root_out_dir/bin/{{source_file_part}}", + ] +}