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

@keith keith marked this pull request as ready for review November 17, 2025 17:36
@keith
Copy link
Member Author

keith commented Nov 17, 2025

this works after #168409

@pranavk
Copy link
Contributor

pranavk commented Nov 17, 2025

@keith we are very interested in getting this merged.

Just to make sure we are on same page. After #168409, this PR should be able to fix the broken bazelbot. No other pending issues, right?

@keith
Copy link
Member Author

keith commented Nov 17, 2025

now #168355 instead but yes hopefully. i imagine something else broke on the bazel side in between, but likely just easy import changes vs something more complex like this. i will land it as soon as that one is in and then fix forward anything else

@keith keith merged commit aa4de7b into llvm:main Nov 17, 2025
13 of 14 checks passed
@keith keith deleted the ks/bazel-add-support-for-multiple-tblgen-outputs branch November 17, 2025 18:41
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants