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:
Mazdak Farrokhzad 2019-04-19 06:03:29 +02:00 committed by GitHub
commit c0ea0d8c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 10 deletions

View File

@ -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);

View File

@ -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 |

View File

@ -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);