Rollup merge of #60097 - cuviper:llvm8-mergefunc-use-aliases, r=rkruppe
Use -mergefunc-use-aliases for any LLVM >= 8 This functionality is not specific to Rust's LLVM, but any starting in LLVM 8.0, as noted in <https://github.com/rust-lang/rust/pull/56358#discussion_r237702197>. cc @nikic r? @rkruppe
This commit is contained in:
commit
c0ea0d8c31
@ -1382,7 +1382,6 @@ extern "C" {
|
||||
pub fn LLVMRustDebugMetadataVersion() -> u32;
|
||||
pub fn LLVMRustVersionMajor() -> u32;
|
||||
pub fn LLVMRustVersionMinor() -> u32;
|
||||
pub fn LLVMRustIsRustLLVM() -> bool;
|
||||
|
||||
pub fn LLVMRustAddModuleFlag(M: &Module, name: *const c_char, value: u32);
|
||||
|
||||
|
@ -61,7 +61,7 @@ unsafe fn configure_llvm(sess: &Session) {
|
||||
if sess.opts.debugging_opts.disable_instrumentation_preinliner {
|
||||
add("-disable-preinline");
|
||||
}
|
||||
if llvm::LLVMRustIsRustLLVM() {
|
||||
if get_major_version() >= 8 {
|
||||
match sess.opts.debugging_opts.merge_functions
|
||||
.unwrap_or(sess.target.target.options.merge_functions) {
|
||||
MergeFunctions::Disabled |
|
||||
|
@ -613,14 +613,6 @@ extern "C" uint32_t LLVMRustVersionMinor() { return LLVM_VERSION_MINOR; }
|
||||
|
||||
extern "C" uint32_t LLVMRustVersionMajor() { return LLVM_VERSION_MAJOR; }
|
||||
|
||||
extern "C" bool LLVMRustIsRustLLVM() {
|
||||
#ifdef LLVM_RUSTLLVM
|
||||
return 1;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustAddModuleFlag(LLVMModuleRef M, const char *Name,
|
||||
uint32_t Value) {
|
||||
unwrap(M)->addModuleFlag(Module::Warning, Name, Value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user