[llvm-dev] Building LLVM with VisualStudio 2017

Gaier, Bjoern via llvm-dev llvm-dev at lists.llvm.org
Sun Oct 28 23:48:09 PDT 2018


Hey Stella,

(Gaier is my last name :0)

I do the same steps as you do! The resulting Clang compiler is indeed working. I have problems with the LLVM library.

When I build the LLVM7 I use the libraries of it in a different project - a JIT client.
When I compile this solution with Visual Studio 2017 and the MSVC compiler, then I get no problems.

But, when I switch to the Clang-cl compiler in Visual Studio 2017, then I get suddenly these undefined references.
The strange thing is, that this also happens when I compile the LLVM with a preinstalled Clang.

Kind greetings
Björn

-----Original Message-----
From: Stella Stamenova <stilis at microsoft.com> 
Sent: Freitag, 26. Oktober 2018 21:02
To: Gaier, Bjoern <Bjoern.Gaier at horiba.com>; Dennis Luehring <dl.soluz at gmx.net>
Subject: RE: [llvm-dev] Building LLVM with VisualStudio 2017

Hey Gaier,

Can you give a few more details on your scenario? We use build LLVM with VS 2017 and we can successfully compile programs with clang afterwards.

At a high level, what we do is:
1) Call Cmake to generate VS2017 Solution
2) Build the solution 
3) Now use clang to compile other programs

Thanks,
-Stella

-----Original Message-----
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Gaier, Bjoern via llvm-dev
Sent: Friday, October 26, 2018 2:52 AM
To: Dennis Luehring <dl.soluz at gmx.net>
Cc: llvm-dev <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017

But building the LLVM and Clang is no problem at all.
The problem occurs when I use the generated LLVM lib files in a project, which I compile with Clang.

-----Original Message-----
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Dennis Luehring via llvm-dev
Sent: Freitag, 26. Oktober 2018 11:41
To: llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] Building LLVM with VisualStudio 2017

something i expirenced when i added the IRParser lib to the Fibonacci example (using cmakelists.txt) - in a clean first build

after the change i was unable to build the project (with masses of errors)

rebuilding on the console with cmake build "repaired" the sln


Am 26.10.2018 um 11:25 schrieb Gaier, Bjoern via llvm-dev:
> Hello everyone,
>
> so there is something that really bothers me. In the past I build LLVM and Clang via the source code and Visual Studio 2015.
> In my project I used then the freshly new build Clang and the LLVM.
>
> But now, since I compiled with Visual Studio 2017 this is not possible anymore. I'm able to compile both, the LLVM and clang, but when I then use clang as the compiler and the LLVM in my project, I get undefined references to: "__std_reverse_trivially_swappable_4"
> And other functions like this.
>
> I also tried, when CMake has generated the Solution file, to change the compiler to LLVM. Clang is executed then, but still - the same error will occur in my project or different projects when they are compiled with Clang.
>
> What am I doing wrong? It prevents me from continuing my project...
>
> Kind greetings
> Bj rn
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7C52b37b78216b49e927ad08d63b28ba97%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636761443462459427&sdata=3rvLcebGFnDaP9hpjwexnEPMURNME6IgQBm%2B9%2FiDxhQ%3D&reserved=0


_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7C52b37b78216b49e927ad08d63b28ba97%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636761443462459427&sdata=3rvLcebGFnDaP9hpjwexnEPMURNME6IgQBm%2B9%2FiDxhQ%3D&reserved=0
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-dev&data=02%7C01%7Cstilis%40microsoft.com%7C52b37b78216b49e927ad08d63b28ba97%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636761443462459427&sdata=3rvLcebGFnDaP9hpjwexnEPMURNME6IgQBm%2B9%2FiDxhQ%3D&reserved=0


More information about the llvm-dev mailing list