File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -385,7 +385,8 @@ impl Config {
385385 }
386386
387387 fn target_cfg ( & self ) -> & TargetCfg {
388- self . target_cfg . borrow_with ( || TargetCfg :: new ( & self . rustc_path , & self . target ) )
388+ self . target_cfg
389+ . borrow_with ( || TargetCfg :: new ( & self . rustc_path , & self . target , & self . target_rustcflags ) )
389390 }
390391
391392 pub fn matches_arch ( & self , arch : & str ) -> bool {
@@ -456,11 +457,12 @@ pub enum Endian {
456457}
457458
458459impl TargetCfg {
459- fn new ( rustc_path : & Path , target : & str ) -> TargetCfg {
460+ fn new ( rustc_path : & Path , target : & str , target_rustcflags : & Option < String > ) -> TargetCfg {
460461 let output = match Command :: new ( rustc_path)
461462 . arg ( "--print=cfg" )
462463 . arg ( "--target" )
463464 . arg ( target)
465+ . args ( target_rustcflags. into_iter ( ) . map ( |s| s. split_whitespace ( ) ) . flatten ( ) )
464466 . output ( )
465467 {
466468 Ok ( output) => output,
You can’t perform that action at this time.
0 commit comments