[Solved] Rust project how build like gcc -mwindow?

That's the same way as checking-in .gitignore

cargo 0.9(currently Rust beta):

[target.'cfg(feature = "do-stuff")']
rustflags = ["..."]

There are also other ways.

[target.'cfg(windows)']
...
[target.x86_64-pc-windows-msvc]
rustflags = ["..."]

That's exactly how I make cargo build for my custom iMX6 ARM target(thanks to ogeon):

[target.arm-unknown-linux-gnueabi]
ar = "arm-montavista-linux-gnueabi-ar"
linker = "gcc-sysroot"