File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1443,6 +1443,23 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
14431443 output_types. insert ( OutputType :: Exe , None ) ;
14441444 }
14451445
1446+ let remap_path_prefix_sources = debugging_opts. remap_path_prefix_from . len ( ) ;
1447+ let remap_path_prefix_targets = debugging_opts. remap_path_prefix_from . len ( ) ;
1448+
1449+ if remap_path_prefix_targets < remap_path_prefix_sources {
1450+ for source in & debugging_opts. remap_path_prefix_from [ remap_path_prefix_targets..] {
1451+ early_error ( error_format,
1452+ & format ! ( "option `-Zremap-path-prefix-from='{}'` does not have \
1453+ a corresponding `-Zremap-path-prefix-to`", source) )
1454+ }
1455+ } else if remap_path_prefix_targets > remap_path_prefix_sources {
1456+ for target in & debugging_opts. remap_path_prefix_to [ remap_path_prefix_sources..] {
1457+ early_error ( error_format,
1458+ & format ! ( "option `-Zremap-path-prefix-to='{}'` does not have \
1459+ a corresponding `-Zremap-path-prefix-from`", target) )
1460+ }
1461+ }
1462+
14461463 let mut cg = build_codegen_options ( matches, error_format) ;
14471464
14481465 // Issue #30063: if user requests llvm-related output to one
You can’t perform that action at this time.
0 commit comments