From 198b18f1d5a2e3bb4a78176e95b788bcf1fc2e82 Mon Sep 17 00:00:00 2001 From: Gunhan Gulsoy Date: Tue, 4 Feb 2020 20:22:01 -0800 Subject: [PATCH] Avoid creating long string literals in tblgen outputs. This solved the following compilation issue on windows: bazel-out/x64_windows-opt/bin/external/llvm-project/llvm/lib/Target/AMDGPU\AMDGPUGenInstrInfo.inc(33991): fatal error C1091: compiler limit: string exceeds 65535 bytes in length PiperOrigin-RevId: 293286375 Change-Id: Ibec6425c57d0e2748d9a76d187ce86a24e324696 --- third_party/llvm/llvm.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/third_party/llvm/llvm.bzl b/third_party/llvm/llvm.bzl index d8e2faf2822..0a2c56033b5 100644 --- a/third_party/llvm/llvm.bzl +++ b/third_party/llvm/llvm.bzl @@ -61,7 +61,8 @@ def gentbl(name, tblgen, td_file, td_srcs, tbl_outs, library = True, **kwargs): message = "Generating code from table: %s" % td_file, cmd = (("$(location %s) " + "-I external/llvm-project/llvm/include " + "-I external/llvm-project/clang/include " + - "-I $$(dirname $(location %s)) " + "%s $(location %s) -o $@") % ( + "-I $$(dirname $(location %s)) " + ("%s $(location %s) --long-string-literals=0 " + + "-o $@")) % ( tblgen, td_file, opts,