@@ -731,19 +731,53 @@ impl MetadataBlob {
731731 writeln ! ( out, "name {}{}" , root. name( ) , root. extra_filename) ?;
732732 writeln ! ( out, "hash {} stable_crate_id {:?}" , root. hash( ) , root. stable_crate_id) ?;
733733 writeln ! ( out, "proc_macro {:?}" , root. proc_macro_data. is_some( ) ) ?;
734- writeln ! ( out, "=External Dependencies=" ) ?;
735-
734+ writeln ! ( out, "triple {}" , root. header. triple. triple( ) ) ?;
735+ writeln ! ( out, "edition {}" , root. edition) ?;
736+ writeln ! ( out, "symbol_mangling_version {:?}" , root. symbol_mangling_version) ?;
737+ writeln ! (
738+ out,
739+ "required_panic_strategy {:?} panic_in_drop_strategy {:?}" ,
740+ root. required_panic_strategy, root. panic_in_drop_strategy
741+ ) ?;
742+ writeln ! (
743+ out,
744+ "has_global_allocator {} has_alloc_error_handler {} has_panic_handler {} has_default_lib_allocator {}" ,
745+ root. has_global_allocator,
746+ root. has_alloc_error_handler,
747+ root. has_panic_handler,
748+ root. has_default_lib_allocator
749+ ) ?;
750+ writeln ! (
751+ out,
752+ "compiler_builtins {} needs_allocator {} needs_panic_runtime {} no_builtins {} panic_runtime {} profiler_runtime {}" ,
753+ root. compiler_builtins,
754+ root. needs_allocator,
755+ root. needs_panic_runtime,
756+ root. no_builtins,
757+ root. panic_runtime,
758+ root. profiler_runtime
759+ ) ?;
760+
761+ writeln ! ( out, "\n =External Dependencies=" ) ?;
762+ let dylib_dependency_formats =
763+ root. dylib_dependency_formats . decode ( self ) . collect :: < Vec < _ > > ( ) ;
736764 for ( i, dep) in root. crate_deps . decode ( self ) . enumerate ( ) {
737765 let CrateDep { name, extra_filename, hash, host_hash, kind, is_private } = dep;
738766 let number = i + 1 ;
739767
740768 writeln ! (
741769 out,
742- "{number} {name}{extra_filename} hash {hash} host_hash {host_hash:?} kind {kind:?} {privacy}" ,
743- privacy = if is_private { "private" } else { "public" }
770+ "{number} {name}{extra_filename} hash {hash} host_hash {host_hash:?} kind {kind:?} {privacy}{linkage}" ,
771+ privacy = if is_private { "private" } else { "public" } ,
772+ linkage = if dylib_dependency_formats. is_empty( ) {
773+ String :: new( )
774+ } else {
775+ format!( " linkage {:?}" , dylib_dependency_formats[ i] )
776+ }
744777 ) ?;
745778 }
746779 write ! ( out, "\n " ) ?;
780+
747781 Ok ( ( ) )
748782 }
749783}
0 commit comments