From add96c8632df9596a73bf637d6b7015e9c7beaad Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Mon, 9 Jul 2018 12:06:35 -0700 Subject: Few more supporting changes for #18293 - Remove LLVM_DEFINES from all targets but :config to avoid running into Windows command line length limitations. - Add LLVM_COPTS to cc_binary rules. - Extract out a list of platform specific headers to a LLVM_SUPPORT_PLATFORM_SPECIFIC_SRCS_GLOB variable. PiperOrigin-RevId: 203806527 --- third_party/llvm/llvm.autogenerated.BUILD | 235 +++++++++++------------------- third_party/llvm/llvm.bzl | 13 +- 2 files changed, 92 insertions(+), 156 deletions(-) (limited to 'third_party/llvm') diff --git a/third_party/llvm/llvm.autogenerated.BUILD b/third_party/llvm/llvm.autogenerated.BUILD index 8f65853918..bf9f9ca9cf 100644 --- a/third_party/llvm/llvm.autogenerated.BUILD +++ b/third_party/llvm/llvm.autogenerated.BUILD @@ -8,13 +8,14 @@ exports_files(["LICENSE.TXT"]) load( "@org_tensorflow//third_party/llvm:llvm.bzl", - "LLVM_COPTS", - "LLVM_DEFINES", - "LLVM_LINKOPTS", "cmake_var_string", "expand_cmake_vars", "gentbl", "llvm_all_cmake_vars", + "llvm_copts", + "llvm_defines", + "llvm_linkopts", + "llvm_support_platform_specific_srcs_glob", ) load( "@org_tensorflow//third_party:common.bzl", @@ -121,7 +122,7 @@ cc_library( "include/llvm/Config/config.h", "include/llvm/Config/llvm-config.h", ], - defines = LLVM_DEFINES, + defines = llvm_defines, includes = ["include"], ) @@ -198,7 +199,8 @@ cc_binary( "utils/TableGen/*.cpp", "utils/TableGen/*.h", ]), - linkopts = LLVM_LINKOPTS, + copts = llvm_copts, + linkopts = llvm_linkopts, stamp = 0, deps = [ ":config", @@ -214,7 +216,8 @@ cc_binary( "utils/FileCheck/*.cpp", "utils/FileCheck/*.h", ]), - linkopts = LLVM_LINKOPTS, + copts = llvm_copts, + linkopts = llvm_linkopts, stamp = 0, deps = [":support"], ) @@ -385,8 +388,7 @@ cc_library( "include/llvm/Target/AArch64/AsmParser/*.inc", "lib/Target/AArch64/AsmParser/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AArch64"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AArch64"], deps = [ ":aarch64_desc", ":aarch64_info", @@ -411,8 +413,7 @@ cc_library( "include/llvm/Target/AArch64/InstPrinter/*.inc", "lib/Target/AArch64/InstPrinter/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AArch64"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AArch64"], deps = [ ":aarch64_target_gen", ":aarch64_utils", @@ -435,8 +436,7 @@ cc_library( "include/llvm/Target/AArch64/*.inc", "lib/Target/AArch64/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AArch64"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AArch64"], deps = [ ":aarch64_asm_printer", ":aarch64_desc", @@ -469,8 +469,7 @@ cc_library( "include/llvm/Target/AArch64/MCTargetDesc/*.inc", "lib/Target/AArch64/MCTargetDesc/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AArch64"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AArch64"], deps = [ ":aarch64_asm_printer", ":aarch64_info", @@ -497,8 +496,7 @@ cc_library( "include/llvm/Target/AArch64/Disassembler/*.inc", "lib/Target/AArch64/Disassembler/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AArch64"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AArch64"], deps = [ ":aarch64_desc", ":aarch64_info", @@ -526,8 +524,7 @@ cc_library( "lib/Target/AArch64/AArch64*.h", "lib/Target/AArch64/TargetInfo/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AArch64"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AArch64"], deps = [ ":code_gen", ":config", @@ -550,8 +547,7 @@ cc_library( "include/llvm/Target/AArch64/Utils/*.inc", "lib/Target/AArch64/Utils/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AArch64"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AArch64"], deps = [ ":aarch64_target_gen", ":config", @@ -573,8 +569,7 @@ cc_library( "include/llvm/Transforms/AggressiveInstCombine/*.def", "include/llvm/Transforms/AggressiveInstCombine/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":config", @@ -599,8 +594,7 @@ cc_library( "include/llvm/Analysis/*.def", "include/llvm/Analysis/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":binary_format", ":config", @@ -624,8 +618,7 @@ cc_library( "include/llvm/Target/AMDGPU/MCTargetDesc/*.inc", "lib/Target/AMDGPU/MCTargetDesc/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AMDGPU"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AMDGPU"], deps = [ ":amdgpu_asm_printer", ":amdgpu_info", @@ -650,8 +643,7 @@ cc_library( "include/llvm/Target/AMDGPU/Disassembler/*.inc", "lib/Target/AMDGPU/Disassembler/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AMDGPU"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AMDGPU"], deps = [ ":amdgpu_desc", ":amdgpu_info", @@ -676,8 +668,7 @@ cc_library( "include/llvm/Target/AMDGPU/TargetInfo/*.inc", "lib/Target/AMDGPU/TargetInfo/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AMDGPU"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AMDGPU"], deps = [ ":amdgpu_target_gen", ":config", @@ -699,8 +690,7 @@ cc_library( "include/llvm/Target/AMDGPU/Utils/*.inc", "lib/Target/AMDGPU/Utils/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AMDGPU"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AMDGPU"], deps = [ ":amdgpu_target_gen", ":config", @@ -723,8 +713,7 @@ cc_library( "include/llvm/Target/AMDGPU/AsmParser/*.inc", "lib/Target/AMDGPU/AsmParser/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AMDGPU"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AMDGPU"], deps = [ ":amdgpu_desc", ":amdgpu_info", @@ -749,8 +738,7 @@ cc_library( "include/llvm/Target/AMDGPU/InstPrinter/*.inc", "lib/Target/AMDGPU/InstPrinter/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AMDGPU"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AMDGPU"], deps = [ ":amdgpu_utils", ":config", @@ -772,8 +760,7 @@ cc_library( "include/llvm/Target/AMDGPU/*.inc", "lib/Target/AMDGPU/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/AMDGPU"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/AMDGPU"], deps = [ ":amdgpu_asm_printer", ":amdgpu_desc", @@ -809,8 +796,7 @@ cc_library( "include/llvm/Target/ARM/AsmParser/*.inc", "lib/Target/ARM/AsmParser/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/ARM"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/ARM"], deps = [ ":arm_desc", ":arm_info", @@ -836,8 +822,7 @@ cc_library( "lib/Target/ARM/*.h", "lib/Target/ARM/InstPrinter/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/ARM"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/ARM"], deps = [ ":arm_info", ":arm_target_gen", @@ -861,8 +846,7 @@ cc_library( "include/llvm/Target/ARM/*.inc", "lib/Target/ARM/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/ARM"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/ARM"], deps = [ ":analysis", ":arm_asm_printer", @@ -898,8 +882,7 @@ cc_library( "include/llvm/Target/ARM/MCTargetDesc/*.inc", "lib/Target/ARM/MCTargetDesc/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/ARM"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/ARM"], deps = [ ":arm_asm_printer", ":arm_info", @@ -927,8 +910,7 @@ cc_library( "include/llvm/Target/ARM/Disassembler/*.inc", "lib/Target/ARM/Disassembler/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/ARM"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/ARM"], deps = [ ":arm_desc", ":arm_info", @@ -953,8 +935,7 @@ cc_library( "include/llvm/Target/ARM/TargetInfo/*.inc", "lib/Target/ARM/TargetInfo/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/ARM"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/ARM"], deps = [ ":arm_target_gen", ":config", @@ -977,8 +958,7 @@ cc_library( "include/llvm/Target/ARM/Utils/*.inc", "lib/Target/ARM/Utils/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/ARM"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/ARM"], deps = [ ":arm_target_gen", ":config", @@ -1000,8 +980,7 @@ cc_library( "include/llvm/AsmParser/*.def", "include/llvm/AsmParser/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":binary_format", ":config", @@ -1024,8 +1003,7 @@ cc_library( "include/llvm/CodeGen/AsmPrinter/*.inc", "lib/CodeGen/AsmPrinter/*.def", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":binary_format", @@ -1056,8 +1034,7 @@ cc_library( "include/llvm/BinaryFormat/ELFRelocs/*.def", "include/llvm/BinaryFormat/WasmRelocs/*.def", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":support", @@ -1078,8 +1055,7 @@ cc_library( "include/llvm/Bitcode/Reader/*.inc", "include/llvm/Bitcode/BitstreamReader.h", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":core", @@ -1103,8 +1079,7 @@ cc_library( "include/llvm/Bitcode/BitcodeWriterPass.h", "include/llvm/Bitcode/BitstreamWriter.h", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":config", @@ -1129,8 +1104,7 @@ cc_library( "include/llvm/CodeGen/*.inc", "include/llvm/CodeGen/**/*.h", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":bit_reader", @@ -1168,8 +1142,7 @@ cc_library( "include/llvm/*.h", "include/llvm/Analysis/*.def", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":attributes_compat_gen", ":attributes_gen", @@ -1194,8 +1167,7 @@ cc_library( "include/llvm/DebugInfo/CodeView/*.def", "include/llvm/DebugInfo/CodeView/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":binary_format", ":config", @@ -1217,8 +1189,7 @@ cc_library( "include/llvm/DebugInfo/MSF/*.def", "include/llvm/DebugInfo/MSF/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":support", @@ -1238,8 +1209,7 @@ cc_library( "include/llvm/Demangle/*.def", "include/llvm/Demangle/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [":config"], ) @@ -1256,8 +1226,7 @@ cc_library( "include/llvm/ExecutionEngine/*.def", "include/llvm/ExecutionEngine/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":core", @@ -1282,8 +1251,7 @@ cc_library( "include/llvm/CodeGen/GlobalISel/*.def", "include/llvm/CodeGen/GlobalISel/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":code_gen", @@ -1313,8 +1281,7 @@ cc_library( "include/llvm/Transforms/InstrProfiling.h", "include/llvm/Transforms/PGOInstrumentation.h", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":config", @@ -1339,8 +1306,7 @@ cc_library( "include/llvm/Transforms/InstCombine/*.def", "include/llvm/Transforms/InstCombine/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":config", @@ -1367,8 +1333,7 @@ cc_library( "include/llvm/Transforms/IPO/*.def", "include/llvm/Transforms/IPO/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":aggressive_inst_combine", ":analysis", @@ -1402,8 +1367,7 @@ cc_library( "include/llvm/IRReader/*.def", "include/llvm/IRReader/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":asm_parser", ":bit_reader", @@ -1426,8 +1390,7 @@ cc_library( "include/llvm/Linker/*.def", "include/llvm/Linker/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":core", @@ -1449,8 +1412,7 @@ cc_library( "include/llvm/MC/*.def", "include/llvm/MC/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":binary_format", ":config", @@ -1472,8 +1434,7 @@ cc_library( "include/llvm/MC/MCDisassembler/*.def", "include/llvm/MC/MCDisassembler/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":mc", @@ -1494,8 +1455,7 @@ cc_library( "include/llvm/MC/MCParser/*.def", "include/llvm/MC/MCParser/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":mc", @@ -1516,8 +1476,7 @@ cc_library( "include/llvm/Target/NVPTX/InstPrinter/*.inc", "lib/Target/NVPTX/InstPrinter/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/NVPTX"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/NVPTX"], deps = [ "nvptx_target_gen", ":attributes_gen", @@ -1541,8 +1500,7 @@ cc_library( "include/llvm/Target/NVPTX/*.inc", "lib/Target/NVPTX/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/NVPTX"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/NVPTX"], deps = [ ":analysis", ":asm_printer", @@ -1576,8 +1534,7 @@ cc_library( "include/llvm/Target/NVPTX/MCTargetDesc/*.inc", "lib/Target/NVPTX/MCTargetDesc/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/NVPTX"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/NVPTX"], deps = [ "nvptx_target_gen", ":config", @@ -1603,8 +1560,7 @@ cc_library( "lib/Target/NVPTX/NVPTX.h", "lib/Target/NVPTX/TargetInfo/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/NVPTX"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/NVPTX"], deps = [ "nvptx_target_gen", ":attributes_gen", @@ -1628,8 +1584,7 @@ cc_library( "include/llvm/Object/*.def", "include/llvm/Object/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":binary_format", ":bit_reader", @@ -1655,8 +1610,7 @@ cc_library( "include/llvm/Transforms/ObjCARC/*.def", "include/llvm/Transforms/ObjCARC/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":config", @@ -1679,8 +1633,7 @@ cc_library( "include/llvm/ExecutionEngine/Orc/*.def", "include/llvm/ExecutionEngine/Orc/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":core", @@ -1707,8 +1660,7 @@ cc_library( "include/llvm/Target/PowerPC/AsmParser/*.inc", "lib/Target/PowerPC/AsmParser/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/PowerPC"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/PowerPC"], deps = [ ":config", ":mc", @@ -1732,8 +1684,7 @@ cc_library( "include/llvm/Target/PowerPC/InstPrinter/*.inc", "lib/Target/PowerPC/InstPrinter/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/PowerPC"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/PowerPC"], deps = [ ":attributes_gen", ":config", @@ -1759,8 +1710,7 @@ cc_library( "include/llvm/Target/PowerPC/*.inc", "lib/Target/PowerPC/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/PowerPC"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/PowerPC"], deps = [ ":analysis", ":asm_printer", @@ -1792,8 +1742,7 @@ cc_library( "include/llvm/Target/PowerPC/MCTargetDesc/*.inc", "lib/Target/PowerPC/MCTargetDesc/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/PowerPC"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/PowerPC"], deps = [ ":attributes_gen", ":config", @@ -1820,8 +1769,7 @@ cc_library( "include/llvm/Target/PowerPC/Disassembler/*.inc", "lib/Target/PowerPC/Disassembler/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/PowerPC"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/PowerPC"], deps = [ ":config", ":mc_disassembler", @@ -1845,8 +1793,7 @@ cc_library( "lib/Target/PowerPC/PPC*.h", "lib/Target/PowerPC/TargetInfo/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/PowerPC"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/PowerPC"], deps = [ ":attributes_gen", ":config", @@ -1870,8 +1817,7 @@ cc_library( "include/llvm/ProfileData/*.def", "include/llvm/ProfileData/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":core", @@ -1900,8 +1846,7 @@ cc_library( "include/llvm/ExecutionEngine/RTDyldMemoryManager.h", "include/llvm/ExecutionEngine/RuntimeDyld*.h", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":mc", @@ -1929,8 +1874,7 @@ cc_library( "include/llvm/Transforms/IPO.h", "include/llvm/Transforms/IPO/SCCP.h", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":aggressive_inst_combine", ":analysis", @@ -1956,8 +1900,7 @@ cc_library( "include/llvm/CodeGen/SelectionDAG/*.def", "include/llvm/CodeGen/SelectionDAG/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":code_gen", @@ -1976,14 +1919,12 @@ cc_library( "lib/Support/*.c", "lib/Support/*.cpp", "lib/Support/*.inc", - "lib/Support/Unix/*.inc", - "lib/Support/Unix/*.h", "include/llvm-c/*.h", "include/llvm/CodeGen/MachineValueType.h", "include/llvm/BinaryFormat/COFF.h", "include/llvm/BinaryFormat/MachO.h", "lib/Support/*.h", - ]), + ] + llvm_support_platform_specific_srcs_glob), hdrs = glob([ "include/llvm/Support/*.h", "include/llvm/Support/*.def", @@ -1995,8 +1936,7 @@ cc_library( "include/llvm/BinaryFormat/MachO.def", "include/llvm/Support/VCSRevision.h", ], - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":demangle", @@ -2019,8 +1959,7 @@ cc_library( "include/llvm/TableGen/*.inc", "include/llvm/Target/*.def", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":config", ":mc", @@ -2046,8 +1985,7 @@ cc_library( "include/llvm/CodeGen/*.def", "include/llvm/CodeGen/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":config", @@ -2072,8 +2010,7 @@ cc_library( "include/llvm/Transforms/Utils/*.def", "include/llvm/Transforms/Utils/*.inc", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":config", @@ -2097,8 +2034,7 @@ cc_library( "include/llvm/Transforms/Vectorize/*.inc", "include/llvm/Transforms/Vectorize.h", ]), - copts = LLVM_COPTS, - defines = LLVM_DEFINES, + copts = llvm_copts, deps = [ ":analysis", ":config", @@ -2122,8 +2058,7 @@ cc_library( "include/llvm/Target/X86/AsmParser/*.inc", "lib/Target/X86/AsmParser/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/X86"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/X86"], deps = [ ":config", ":mc", @@ -2148,8 +2083,7 @@ cc_library( "include/llvm/Target/X86/InstPrinter/*.inc", "lib/Target/X86/InstPrinter/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/X86"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/X86"], deps = [ ":config", ":mc", @@ -2173,8 +2107,7 @@ cc_library( "include/llvm/Target/X86/*.inc", "lib/Target/X86/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/X86"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/X86"], deps = [ ":analysis", ":asm_printer", @@ -2207,8 +2140,7 @@ cc_library( "include/llvm/Target/X86/MCTargetDesc/*.inc", "lib/Target/X86/MCTargetDesc/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/X86"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/X86"], deps = [ ":config", ":mc", @@ -2233,8 +2165,7 @@ cc_library( "include/llvm/Target/X86/Disassembler/*.inc", "lib/Target/X86/Disassembler/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/X86"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/X86"], deps = [ ":config", ":mc_disassembler", @@ -2257,8 +2188,7 @@ cc_library( "include/llvm/Target/X86/TargetInfo/*.inc", "lib/Target/X86/TargetInfo/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/X86"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/X86"], deps = [ ":config", ":mc", @@ -2280,8 +2210,7 @@ cc_library( "include/llvm/Target/X86/Utils/*.inc", "lib/Target/X86/Utils/*.h", ]), - copts = LLVM_COPTS + ["-Iexternal/llvm/lib/Target/X86"], - defines = LLVM_DEFINES, + copts = llvm_copts + ["-Iexternal/llvm/lib/Target/X86"], deps = [ ":code_gen", ":config", diff --git a/third_party/llvm/llvm.bzl b/third_party/llvm/llvm.bzl index 2e809e5f14..dfdacafceb 100644 --- a/third_party/llvm/llvm.bzl +++ b/third_party/llvm/llvm.bzl @@ -226,9 +226,9 @@ llvm_all_cmake_vars = select({ }) -LLVM_LINKOPTS = ["-ldl", "-lm", "-lpthread"] +llvm_linkopts = ["-ldl", "-lm", "-lpthread"] -LLVM_DEFINES = [ +llvm_defines = [ "LLVM_ENABLE_STATS", "__STDC_LIMIT_MACROS", "__STDC_CONSTANT_MACROS", @@ -237,4 +237,11 @@ LLVM_DEFINES = [ "LLVM_BUILD_GLOBAL_ISEL", ] -LLVM_COPTS = [] +llvm_copts = [] + +# Platform specific sources for libSupport. + +llvm_support_platform_specific_srcs_glob = [ + "lib/Support/Unix/*.inc", + "lib/Support/Unix/*.h", +] -- cgit v1.2.3