https://github.com/kuhar requested changes to this pull request. Could you add a test that shows where this comes up? I'm not sure if we should look up the target env in`"targets"` attribute in **any** of possible parents https://github.com/llvm/llvm-project/pull/147262