From 75632fec58b83a19cf4dc818931f452cff708822 Mon Sep 17 00:00:00 2001 From: Aaron Siddhartha Mondal Date: Wed, 24 May 2023 00:24:05 +0200 Subject: [PATCH] [bazel] Add clang-offload-packager and clang-linker-wrapper Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D151131 --- utils/bazel/llvm-project-overlay/clang/BUILD.bazel | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel index 419b2ee..158430c 100644 --- a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel @@ -2252,6 +2252,68 @@ cc_binary( ) cc_binary( + name = "clang-offload-packager", + srcs = glob(["tools/clang-offload-packager/*.cpp"]), + stamp = 0, + deps = [ + ":basic", + "//llvm:BinaryFormat", + "//llvm:Object", + "//llvm:Support", + ], +) + +gentbl( + name = "linker_wrapper_opts_gen", + tbl_outs = [( + "-gen-opt-parser-defs", + "tools/clang-linker-wrapper/LinkerWrapperOpts.inc", + )], + tblgen = "//llvm:llvm-tblgen", + td_file = "tools/clang-linker-wrapper/LinkerWrapperOpts.td", + td_srcs = [ + "tools/clang-linker-wrapper/LinkerWrapperOpts.td", + "//llvm:include/llvm/Option/OptParser.td", + ], +) + +cc_binary( + name = "clang-linker-wrapper", + srcs = [ + "tools/clang-linker-wrapper/ClangLinkerWrapper.cpp", + "tools/clang-linker-wrapper/OffloadWrapper.cpp", + "tools/clang-linker-wrapper/OffloadWrapper.h", + ], + copts = [ + "-I$(GENDIR)/$(WORKSPACE_ROOT)/clang/tools/clang-linker-wrapper", + ], + toolchains = [ + ":workspace_root", + ], + stamp = 0, + deps = [ + ":basic", + ":linker_wrapper_opts_gen", + "//llvm:AllTargetsAsmParsers", + "//llvm:BitWriter", + "//llvm:Core", + "//llvm:BinaryFormat", + "//llvm:MC", + "//llvm:Target", + "//llvm:TransformUtils", + "//llvm:Analysis", + "//llvm:Passes", + "//llvm:IRReader", + "//llvm:Object", + "//llvm:Option", + "//llvm:Support", + "//llvm:TargetParser", + "//llvm:CodeGen", + "//llvm:LTO", + ], +) + +cc_binary( name = "clang-refactor", srcs = glob([ "tools/clang-refactor/*.cpp", -- 2.7.4