49 lines · plain
1import("//llvm/lib/Target/targets.gni")2import("//third-party/unittest/unittest.gni")3 4unittest("PassTests") {5 configs += [ "//llvm/utils/gn/build:bolt_code" ]6 deps = [7 "//bolt/include/bolt/Core:TargetConfig.def",8 "//bolt/lib/Core",9 "//bolt/lib/Passes",10 "//bolt/lib/Profile",11 "//bolt/lib/Rewrite",12 "//bolt/lib/Utils",13 "//llvm/lib/DebugInfo/DWARF",14 "//llvm/lib/MC",15 "//llvm/lib/Object",16 "//llvm/lib/Target:TargetsToBuild",17 ]18 sources = [ "InsertNegateRAState.cpp" ]19 20 defines = []21 include_dirs = []22 if (llvm_build_AArch64) {23 defines += [ "AARCH64_AVAILABLE" ]24 25 # This target reaches into the internal headers of LLVM's AArch64 library.26 # That target doesn't expect that, so it doesn't use public_deps for27 # tblgen-generated headers used only in internal headers (...which this28 # target here questionably includes). So depend on the target that generates29 # those headers here.30 include_dirs += [ "//llvm/lib/Target/AArch64" ]31 deps += [32 "//llvm/lib/Target/AArch64:AArch64GenSDNodeInfo",33 "//llvm/lib/Target/AArch64/MCTargetDesc",34 "//llvm/lib/Target/AArch64/Utils",35 ]36 }37 if (llvm_build_X86) {38 defines += [ "X86_AVAILABLE" ]39 40 # This target reaches into the internal headers of LLVM's X86 library.41 # That target doesn't expect that, so it doesn't use public_deps for42 # tblgen-generated headers used only in internal headers (...which this43 # target here questionably includes). So depend on the target that generates44 # those headers here.45 include_dirs += [ "//llvm/lib/Target/X86" ]46 deps += [ "//llvm/lib/Target/X86/MCTargetDesc" ]47 }48}49