File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,4 +9,8 @@ libm = "0.2"
99crate-type = [" staticlib" ]
1010harness = false
1111
12+ [profile .profiling ]
13+ inherits = " release"
14+ debug = " line-tables-only"
15+
1216[workspace ]
Original file line number Diff line number Diff line change @@ -42,6 +42,14 @@ impl Artifact {
4242 }
4343 }
4444
45+ pub fn builtins_profile_path_component ( & self ) -> & str {
46+ if self . profile_path_component ( ) == "profiling" {
47+ self . profile_path_component ( )
48+ } else {
49+ "release"
50+ }
51+ }
52+
4553 pub fn target_dir ( & self ) -> PathBuf {
4654 if let Some ( target_dir) = & self . target_dir {
4755 return path:: absolute ( target_dir) . unwrap ( ) ;
@@ -58,7 +66,7 @@ impl Artifact {
5866 [
5967 self . builtins_target_dir ( ) . as_path ( ) ,
6068 self . arch . hermit_triple ( ) . as_ref ( ) ,
61- "release" . as_ref ( ) ,
69+ self . builtins_profile_path_component ( ) . as_ref ( ) ,
6270 "libhermit_builtins.a" . as_ref ( ) ,
6371 ]
6472 . iter ( )
Original file line number Diff line number Diff line change @@ -74,8 +74,10 @@ impl Build {
7474 eprintln ! ( "Building hermit-builtins" ) ;
7575 let mut cargo = crate :: cargo ( ) ;
7676 cargo
77- . args ( [ "build" , "--release" ] )
77+ . arg ( "build" )
7878 . arg ( "--manifest-path=hermit-builtins/Cargo.toml" )
79+ . arg ( "--profile" )
80+ . arg ( self . cargo_build . artifact . builtins_profile_path_component ( ) )
7981 . args ( self . cargo_build . artifact . arch . builtins_cargo_args ( ) )
8082 . args ( self . cargo_build . builtins_target_dir_arg ( ) ) ;
8183
You can’t perform that action at this time.
0 commit comments