Skip to content

1.5 fails to build against upstream LLVM 3.7 #30304

@sylvestre

Description

@sylvestre

Using Debian package 3.7

x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_front-35c36e89.rlib
g++  -O2  -Wall -Werror -g -fPIC -m64 -fno-rtti -c -o  x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o  -I//usr//lib//llvm-3.7//include  -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -O2 -fomit-frame-pointer -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fPIC -ffunction-sections -fdata-sections -Wcast-qual   -I /usr/lib/llvm-3.7/include -I /home/sylvestre/dev/debian/rustc.git/src/rustllvm/include /home/sylvestre/dev/debian/rustc.git/src/rustllvm/RustWrapper.cpp
/home/sylvestre/dev/debian/rustc.git/src/rustllvm/RustWrapper.cpp: In function ‘LLVMOpaqueValue* LLVMRustBuildLandingPad(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef, unsigned int, const char*, LLVMValueRef)’:
/home/sylvestre/dev/debian/rustc.git/src/rustllvm/RustWrapper.cpp:972:69: error: invalid conversion from ‘LLVMValueRef {aka LLVMOpaqueValue*}’ to ‘unsigned int’ [-fpermissive]
     return LLVMBuildLandingPad(Builder, Ty, PersFn, NumClauses, Name);
                                                                     ^
/home/sylvestre/dev/debian/rustc.git/src/rustllvm/RustWrapper.cpp:972:69: error: invalid conversion from ‘unsigned int’ to ‘const char*’ [-fpermissive]
/home/sylvestre/dev/debian/rustc.git/src/rustllvm/RustWrapper.cpp:972:69: error: too many arguments to function ‘LLVMOpaqueValue* LLVMBuildLandingPad(LLVMBuilderRef, LLVMTypeRef, unsigned int, const char*)’
In file included from //usr//lib//llvm-3.7//include/llvm/IR/Value.h:17:0,
                 from //usr//lib//llvm-3.7//include/llvm/IR/User.h:24,
                 from //usr//lib//llvm-3.7//include/llvm/IR/Instruction.h:22,
                 from //usr//lib//llvm-3.7//include/llvm/IR/BasicBlock.h:19,
                 from //usr//lib//llvm-3.7//include/llvm/IR/IRBuilder.h:21,
                 from /home/sylvestre/dev/debian/rustc.git/src/rustllvm/rustllvm.h:11,
                 from /home/sylvestre/dev/debian/rustc.git/src/rustllvm/RustWrapper.cpp:11:
//usr//lib//llvm-3.7//include/llvm-c/Core.h:2677:14: note: declared here
 LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
              ^
/home/sylvestre/dev/debian/rustc.git/mk/rustllvm.mk:60: recipe for target 'x86_64-unknown-linux-gnu/rustllvm/RustWrapper.o' failed

Updating to 3.7.1 rc2 fixes the build. Having a version check in the configure would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions