Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Nov 15, 2025

Required after #167700

This adds yet another format for tbl_outs where you pass the list of opts, and a list of outputs (where previously you could only have 1 output). In that case all outputs must be produced, but the first is used for the -o arg since tblgen is generating the other names based on that single argument.

@keith keith marked this pull request as draft November 15, 2025 00:13
@llvmbot llvmbot added the bazel "Peripheral" support tier build system: utils/bazel label Nov 15, 2025
@keith
Copy link
Member Author

keith commented Nov 15, 2025

this doesn't work as is because the case where this is used today writes #includes to the file that are relative to bazel-bin and are not valid later on without some more includes / strip_include_prefix usage

@keith keith force-pushed the ks/bazel-add-support-for-multiple-tblgen-outputs branch from 51d3b31 to 59c2e3c Compare November 15, 2025 00:15
@keith
Copy link
Member Author

keith commented Nov 15, 2025

big reformat change here required by buildifier, but this was an automated swap from dictionary to the tuple format

@keith
Copy link
Member Author

keith commented Nov 15, 2025

i think that we'll need to do something smarter for tblgen's #include path creation since right now it looks like this:

#include "bazel-out/cfg/bin/external/+llvm_configure+llvm-project/llvm/lib/Target/AMDGPU/R600GenRegisterInfoTargetDesc.inc" 

but likely we want this:

#include "llvm/lib/Target/AMDGPU/R600GenRegisterInfoTargetDesc.inc" 

i think the assumption was the latter path would also match the argument to tblgen itself, and that assumption doesn't hold with bazel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bazel "Peripheral" support tier build system: utils/bazel

2 participants