Fixes the following building error:
external/llvm/utils/TableGen/GlobalISel/CodeExpander.h:50:
error: undefined reference to 'llvm::CodeExpander::emit(llvm::raw_ostream&) const'
srcs: ["*.cpp"],
static_libs: [
+ "libLLVMTableGenGlobalISel",
"libLLVMTableGen",
"libLLVMSupport",
],
},
},
}
+
+subdirs = ["*"]
--- /dev/null
+cc_library_static {
+ name: "libLLVMTableGenGlobalISel",
+ defaults: ["llvm-defaults-no-generated-headers"],
+ srcs: ["*.cpp"],
+
+ static_libs: [
+ "libLLVMSupport",
+ ],
+
+ host_ldlibs: ["-lm"],
+ target: {
+ windows: {
+ enabled: false,
+ },
+ // llvm-defaults turns off host builds by default, turn it back on for
+ // modules that are used to build llvm-tblgen
+ host: {
+ enabled: true,
+ },
+ darwin: {
+ host_ldlibs: [
+ "-lpthread",
+ "-ldl",
+ ],
+ },
+ linux: {
+ host_ldlibs: [
+ "-lpthread",
+ "-ldl",
+ ],
+ },
+ },
+}