Rustup add target for a custom toolchain

I have built a custom toolchain 'dev' and used ./ install, but use rustup add target for 'dev' got an error:

$ rustup target add armebv7r-none-eabi --toolchain dev
error: toolchain 'dev' does not support components: dev is a custom toolchain

What can I do to make it right?
Thanks in advance!

I followed these steps:

  1. ./ build
  2. ./ build --stage 2
  3. ./ install
  4. rustup toolchain link dev 'installation path'
  5. rustup target add armebv7r-none-eabi --toolchain dev
    What else I need to do?

You need to build the target when building the custom toolchain. You can pass --target to Make sure to also include the host target, otherwise build scripts and proc macros don't work.

Thank you! You are totally right, it works!