File tree Expand file tree Collapse file tree
stdarch-gen-hexagon-scalar/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -664,7 +664,11 @@ fn main() -> Result<(), String> {
664664 let intrinsics = parse_header ( & header_content) ;
665665 println ! ( "Parsed {} scalar intrinsics" , intrinsics. len( ) ) ;
666666
667- let hexagon_dir = crate_dir. join ( "../core_arch/src/hexagon" ) ;
667+ let hexagon_dir = std:: env:: args ( )
668+ . nth ( 1 )
669+ . map ( std:: path:: PathBuf :: from)
670+ . unwrap_or_else ( || crate_dir. join ( "../core_arch/src/hexagon" ) ) ;
671+ std:: fs:: create_dir_all ( & hexagon_dir) . map_err ( |e| e. to_string ( ) ) ?;
668672 let scalar_path = hexagon_dir. join ( "scalar.rs" ) ;
669673
670674 generate_scalar_file ( & intrinsics, & scalar_path) ?;
Original file line number Diff line number Diff line change @@ -1691,7 +1691,11 @@ fn main() -> Result<(), String> {
16911691 }
16921692
16931693 // Generate output files
1694- let hexagon_dir = crate_dir. join ( "../core_arch/src/hexagon" ) ;
1694+ let hexagon_dir = std:: env:: args ( )
1695+ . nth ( 1 )
1696+ . map ( std:: path:: PathBuf :: from)
1697+ . unwrap_or_else ( || crate_dir. join ( "../core_arch/src/hexagon" ) ) ;
1698+ std:: fs:: create_dir_all ( & hexagon_dir) . map_err ( |e| e. to_string ( ) ) ?;
16951699
16961700 // Generate v64.rs (64-byte vector mode)
16971701 let v64_path = hexagon_dir. join ( "v64.rs" ) ;
You can’t perform that action at this time.
0 commit comments