File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ fn extern_flags() -> String {
104
104
}
105
105
crates
106
106
. into_iter ( )
107
- . map ( |( name, path) | format ! ( "--extern {}={} " , name, path) )
107
+ . map ( |( name, path) | format ! ( " --extern {}={}" , name, path) )
108
108
. collect ( )
109
109
}
110
110
@@ -126,10 +126,13 @@ fn default_config() -> compiletest::Config {
126
126
// Using `-L dependency={}` enforces that external dependencies are added with `--extern`.
127
127
// This is valuable because a) it allows us to monitor what external dependencies are used
128
128
// and b) it ensures that conflicting rlibs are resolved properly.
129
+ let host_libs = option_env ! ( "HOST_LIBS" )
130
+ . map ( |p| format ! ( " -L dependency={}" , Path :: new( p) . join( "deps" ) . display( ) ) )
131
+ . unwrap_or_default ( ) ;
129
132
config. target_rustcflags = Some ( format ! (
130
- "--emit=metadata -L dependency={} -L dependency={} -Dwarnings -Zui-testing {}" ,
131
- host_lib( ) . join( "deps" ) . display( ) ,
133
+ "--emit=metadata -Dwarnings -Zui-testing -L dependency={}{}{}" ,
132
134
deps_path. display( ) ,
135
+ host_libs,
133
136
extern_flags( ) ,
134
137
) ) ;
135
138
You can’t perform that action at this time.
0 commit comments