mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-06 12:26:03 +02:00
rustc: add target, target-cpu and print examples (#4320)
This commit is contained in:
parent
bcd66b20d4
commit
8b4481dc3f
1 changed files with 16 additions and 0 deletions
|
@ -15,3 +15,19 @@
|
|||
- Compile with debugging information:
|
||||
|
||||
`rustc -g {{file.rs}}`
|
||||
|
||||
- Compile with architecture-specific optimizations for the current CPU:
|
||||
|
||||
`rustc -C target-cpu=native {{path/to/file.rs}}`
|
||||
|
||||
- Display architecture-specific optimizations for the current CPU:
|
||||
|
||||
`rustc -C target-cpu=native --print cfg`
|
||||
|
||||
- Display target list:
|
||||
|
||||
`rustc --print target-list`
|
||||
|
||||
- Compile for a specific target:
|
||||
|
||||
`rustc --target {{target_triple}} {{path/to/file.rs}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue