mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
FIX meta_section_name for macos
This commit is contained in:
@@ -206,7 +206,8 @@ fn get_metadata_section(os: os,
|
||||
while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
|
||||
let name_buf = llvm::LLVMGetSectionName(si.llsi);
|
||||
let name = unsafe { str::raw::from_c_str(name_buf) };
|
||||
if name == meta_section_name(os) {
|
||||
debug!("get_matadata_section: name %s", name);
|
||||
if name == read_meta_section_name(os) {
|
||||
let cbuf = llvm::LLVMGetSectionContents(si.llsi);
|
||||
let csz = llvm::LLVMGetSectionSize(si.llsi) as uint;
|
||||
let mut found = None;
|
||||
@@ -251,6 +252,16 @@ pub fn meta_section_name(os: os) -> ~str {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn read_meta_section_name(os: os) -> ~str {
|
||||
match os {
|
||||
os_macos => ~"__note.rustc",
|
||||
os_win32 => ~".note.rustc",
|
||||
os_linux => ~".note.rustc",
|
||||
os_android => ~".note.rustc",
|
||||
os_freebsd => ~".note.rustc"
|
||||
}
|
||||
}
|
||||
|
||||
// A diagnostic function for dumping crate metadata to an output stream
|
||||
pub fn list_file_metadata(intr: @ident_interner,
|
||||
os: os,
|
||||
|
||||
Reference in New Issue
Block a user