File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -5777,3 +5777,41 @@ hello
5777
5777
"# ] ] )
5778
5778
. run ( ) ;
5779
5779
}
5780
+
5781
+ #[ cargo_test]
5782
+ fn links_overrides_with_target_applies_to_host ( ) {
5783
+ let p = project ( )
5784
+ . file (
5785
+ "Cargo.toml" ,
5786
+ r#"
5787
+ [package]
5788
+ name = "mylib-sys"
5789
+ edition = "2021"
5790
+ version = "0.0.1"
5791
+ authors = []
5792
+ links = "mylib"
5793
+ "# ,
5794
+ )
5795
+ . file ( "src/lib.rs" , "" )
5796
+ . file ( "build.rs" , "bad file" )
5797
+ . build ( ) ;
5798
+
5799
+ p. cargo ( "build -v" )
5800
+ . masquerade_as_nightly_cargo ( & [ "target-applies-to-host" ] )
5801
+ . args ( & [
5802
+ "-Ztarget-applies-to-host" ,
5803
+ "--config" ,
5804
+ "target-applies-to-host=false" ,
5805
+ ] )
5806
+ . args ( & [
5807
+ "--config" ,
5808
+ & format ! ( r#"target.{}.mylib.rustc-link-search=["foo"]"# , rustc_host( ) ) ,
5809
+ ] )
5810
+ . with_status ( 101 )
5811
+ . with_stderr_data (
5812
+ "thread 'main' panicked at src/cargo/core/compiler/custom_build.rs:256:10:
5813
+ running a script not depending on an actual script
5814
+ ..." ,
5815
+ )
5816
+ . run ( ) ;
5817
+ }
You can’t perform that action at this time.
0 commit comments