target spec: add an asm-args field to pass arguments to the external .. · rust-lang/rust@bd85a6d (original) (raw)

`@@ -267,6 +267,9 @@ pub struct TargetOptions {

`

267

267

`/// user-defined libraries.

`

268

268

`pub post_link_args: Vec,

`

269

269

``

``

270

`+

/// Extra arguments to pass to the external assembler (when used)

`

``

271

`+

pub asm_args: Vec,

`

``

272

+

270

273

`` /// Default CPU to pass to LLVM. Corresponds to llc -mcpu=$cpu. Defaults

``

271

274

`/// to "generic".

`

272

275

`pub cpu: String,

`

`@@ -394,6 +397,7 @@ impl Default for TargetOptions {

`

394

397

`ar: option_env!("CFG_DEFAULT_AR").unwrap_or("ar").to_string(),

`

395

398

`pre_link_args: Vec::new(),

`

396

399

`post_link_args: Vec::new(),

`

``

400

`+

asm_args: Vec::new(),

`

397

401

`cpu: "generic".to_string(),

`

398

402

`features: "".to_string(),

`

399

403

`dynamic_linking: false,

`

`@@ -561,6 +565,7 @@ impl Target {

`

561

565

`key!(late_link_args, list);

`

562

566

`key!(post_link_objects, list);

`

563

567

`key!(post_link_args, list);

`

``

568

`+

key!(asm_args, list);

`

564

569

`key!(cpu);

`

565

570

`key!(features);

`

566

571

`key!(dynamic_linking, bool);

`

`@@ -723,6 +728,7 @@ impl ToJson for Target {

`

723

728

`target_option_val!(late_link_args);

`

724

729

`target_option_val!(post_link_objects);

`

725

730

`target_option_val!(post_link_args);

`

``

731

`+

target_option_val!(asm_args);

`

726

732

`target_option_val!(cpu);

`

727

733

`target_option_val!(features);

`

728

734

`target_option_val!(dynamic_linking);

`