lkml.org 
[lkml]   [2023]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2 06/11] kbuild: rust_is_available: check that environment variables are set
    From
    On 6/15/23 21:16, Miguel Ojeda wrote:
    > Sometimes [1] users may attempt to setup the Rust support by
    > checking what Kbuild does and they end up finding out about
    > `scripts/rust_is_available.sh`. Inevitably, they run the script
    > directly, but unless they setup the required variables,
    > the result of the script is not meaningful.
    >
    > We could add some defaults to the variables, but that could be
    > confusing for those that may override the defaults (compared
    > to their kernel builds), and `$CC` would not be a simple default
    > in any case.
    >
    > Therefore, instead, explicitly check whether the expected variables
    > are set (`$RUSTC`, `$BINDGEN` and `$CC`). If not, print an explanation
    > about the fact that the script is meant to be called from Kbuild,
    > since that is the most likely cause for the variables not being set.
    >
    > Link: https://lore.kernel.org/oe-kbuild-all/Y6r4mXz5NS0+HVXo@zn.tnic/ [1]
    > Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    > ---
    > [...]

    Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>

    \
     
     \ /
      Last update: 2023-06-16 17:02    [W:4.385 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site