rules_cuda icon indicating copy to clipboard operation
rules_cuda copied to clipboard

Flags passed to nvcc for host configuration don't honor cfg

Open jsharpe opened this issue 2 years ago • 4 comments
trafficstars

The flags passed to the host compilation portion of nvcc don't honor the bazel configured toolchain flags.

Notably -g doesn't get propagated to the flags passed to nvcc when building with -c dbg and as a result no symbols are found.

jsharpe avatar Jan 03 '23 21:01 jsharpe

Maybe a search path issue? For me, I need to use dir bazel-rules_cuda for symbol to work image

cloudhan avatar Jan 04 '23 01:01 cloudhan

No, it's definitely missing the symbols, I have to add -g to host_copts to get it to work. This is specifically with the grailbio llvm 14 compiler as the host compiler so it may be down to some interaction with those rules.

jsharpe avatar Jan 04 '23 06:01 jsharpe

Can you provide a repro? I might dig into it once I have time.

cloudhan avatar Jan 05 '23 03:01 cloudhan

I'll have to try to find some time to isolate a reproducer, its within a reasonably complex build setup with pybind extensions so it's not easy to pull out straight away

jsharpe avatar Jan 06 '23 23:01 jsharpe