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
This commit is contained in:
Gunhan Gulsoy 2020-02-04 20:22:01 -08:00 committed by TensorFlower Gardener
parent 868a90b9eb
commit 198b18f1d5

View File

@ -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,