-
Notifications
You must be signed in to change notification settings - Fork 168
Description
clang and gcc both can both delegate various part of the build to external tools. ld and as are the most popular.
In the case of CUDA, extra binaries such as ptxas come at play.
By default clang expects to find it inside a bin folder under --cuda-path=.
Or at a custom path defined by --ptxas-path=
The issue is that cc_args to pass --ptxas-path is evaluated under cc_toolchain.args which is target configured, whereas ptxas needs to match the platform resolved for the toolchain.
An option is to wrap those binaries into rule that reexports the binary provided as cfg = "exec" but from our own experience, exec cfg isn't guaranteed to match the resolved platform for the toolchain.
Arguably, the ability to pass a custom --ld-path would suffer from the same issue.
From my understanding, only the tool_map would be guaranteed to match the resolved platform for the toolchain, and that only after #555 lands.
Has this use case ever been considered ?
cc @dzbarsky and @fmeum with whom we have regular discussion about this.