How do I build rustfmt using x.py

I'm trying to build a custom rust toolchain along with associated tools (like rustfmt, clippy, etc).

I tried:

git clone git://github.com/rust-lang/rust.git
cd rust
mkdir build
cd build
../configure --target=x86_64-apple-darwin --tools=cargo,rls,clippy,rustfmt,analysis
python ../x.py build

but it doesn't seem to build the tools.

The rustfmt tool is found in this repository.

Thanks, but that doesn’t help me. I’m trying to build a custom toolchain and integrate rustfmt and clippy.

I’m using rust’s x.py script to build rust and the standard libraries. Curiously it takes a —tools argument but doesn’t seem to build those tools. I’ve discovered that I can pass “build rustfmt” to the x.py script, but then what is the purpose of the —tools when configuring the rust toolchain?

I think you need to configure with --enable-extended too.

Thanks - using --enable-extended is the magic I needed.