Closed AnithaSyed closed 1 month ago
Are you the wrapper author? We already have a wrapper here: https://github.com/f0rmiga/gcc-toolchain/blob/36e3e1f430871b539ce9261f53491564aa91c170/toolchain/wrapper.sh.tpl.
It gets rendered here: https://github.com/f0rmiga/gcc-toolchain/blob/36e3e1f430871b539ce9261f53491564aa91c170/toolchain/defs.bzl#L229-L237.
This means you have to patch gcc_toolchain
to be able to inject a custom wrapper here: https://github.com/f0rmiga/gcc-toolchain/blob/36e3e1f430871b539ce9261f53491564aa91c170/toolchain/defs.bzl#L161C1-L161C14.
If you come up with a solution that can be upstreamed, I'm happy to review a PR.
Feel free to reopen this issue if my suggestion doesn't work.
We are using a internal wrapper tool in the make for the gcc compiler. In bazel since we need to use the toolchain, is there a way to run this wrapper in the toolchain. EG:- The default gcc command is as
/usr/bin/gcc <args for compiler>
(Thnx to toolchain I can directly use the arch we need) Need to run a<wrapper> <args_for_wrapper> /usr/bin/gcc <args for compiler>
Please help on a approach to achieve this using the hermatic toolchain.