@@ -18,6 +18,7 @@ fn main() -> Result<(), Error> {
1818 let dest_file = env_path ( "DEST" ) ?;
1919 let libstd_dest_file = env_path ( "DEST_LIBSTD" ) ?;
2020 let out_dir = env_path ( "OUT_DIR" ) ?;
21+ let src_dir = env_path ( "SRC_DIR" ) ?;
2122 let cargo = env_path ( "CARGO" ) ?;
2223 let license_metadata = env_path ( "LICENSE_METADATA" ) ?;
2324
@@ -27,7 +28,7 @@ fn main() -> Result<(), Error> {
2728 let mut collected_cargo_metadata = cargo_metadata:: get_metadata_and_notices (
2829 & cargo,
2930 & out_dir. join ( "vendor" ) ,
30- & root_path ,
31+ & src_dir ,
3132 & [
3233 Path :: new ( "./Cargo.toml" ) ,
3334 Path :: new ( "./src/tools/cargo/Cargo.toml" ) ,
@@ -38,7 +39,7 @@ fn main() -> Result<(), Error> {
3839 let library_collected_cargo_metadata = cargo_metadata:: get_metadata_and_notices (
3940 & cargo,
4041 & out_dir. join ( "library-vendor" ) ,
41- & root_path ,
42+ & src_dir ,
4243 & [ Path :: new ( "./library/Cargo.toml" ) ] ,
4344 ) ?;
4445
@@ -54,7 +55,7 @@ fn main() -> Result<(), Error> {
5455 let library_collected_tree_metadata = Metadata {
5556 files : collected_tree_metadata
5657 . files
57- . trim_clone ( & Path :: new ( "./ library") , & Path :: new ( "." ) )
58+ . trim_clone ( & src_dir . join ( " library") , & src_dir )
5859 . unwrap ( ) ,
5960 } ;
6061
0 commit comments