[Openmp-dev] Building a static library of OpenMP

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Mon Apr 29 16:27:35 PDT 2019


Spoke too soon. Setting LIBOMP_ENABLE_SHARED to FALSE gives me libomp.a on
AArch64.

On Tue, Apr 30, 2019 at 8:14 AM Itaru Kitayama <itaru.kitayama at gmail.com>
wrote:

> Doru et al.,
>
> My build was initiated on AArch64 like below:
>
> cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release
> -DCMAKE_INSTALL_PREFIX=$HOME/opt/clang-ykt -DCMAKE_C_COMPILER=clang
> -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=AArch64
> ~/projects/clang-ykt/
>
> Clang is provided from upstream as of yesterday-ish. The build process
> went ok, but I ended up obtaining a libomp.so.
> (I made sure that BUILD_SHARED_LIBS was set to OFF, clang was located
> under the tools directory and openmp under projects)
>
> Itaru.
>
> On Mon, Apr 29, 2019 at 11:49 PM Gheorghe-Teod Bercea <
> Gheorghe-Teod.Bercea at ibm.com> wrote:
>
>> Hi Itaru,
>>
>> What version of Clang are you using?
>>
>> I have a version which supports static linking at this page:
>>
>> https://github.com/clang-ykt
>>
>> Clone the llvm, clang and openmp repos and use the patched-upstream
>> branch on all three.
>>
>> Then build as you normally do.
>>
>> This is a version that is quite recent, updated to newest development
>> trunk yesterday.
>>
>> Let me know if this works.
>>
>> Thanks,
>>
>> --Doru
>>
>> *Doru Bercea*
>> Research Staff Member
>> Cloud Platform - Advanced Compilers Group
>> IBM TJ Watson Research Center
>> ------------------------------
>> *Phone:*914-945-2196 | *Mobile:*914-208-1517
>> *E-mail:* *Gheorghe-Teod.Bercea at ibm.com* <Gheorghe-Teod.Bercea at ibm.com>
>> *Chat:*[image: Skype:]doru.bercea
>> [image: IBM]
>>
>> Yorktown Heights, NY 10598
>> United States
>>
>>
>>
>>
>>
>>
>> From:        Alexey Bataev <a.bataev at outlook.com>
>> To:        Itaru Kitayama <itaru.kitayama at gmail.com>, Gheorghe-Teod
>> Bercea <gheorghe-teod.bercea at ibm.com>
>> Cc:        "openmp-dev at lists.llvm.org" <openmp-dev at lists.llvm.org>
>> Date:        04/29/2019 10:29 AM
>> Subject:        Re: [Openmp-dev] Building a static library of OpenMP
>> ------------------------------
>>
>>
>>
>> Doru, can you help with this?
>>
>> -------------
>> Best regards,
>> Alexey Bataev
>> 28.04.2019 2:25, Itaru Kitayama пишет:
>> Alexey, all,
>> My platform requires apps be built statically, so creating libomp.a is a
>> critical mission for me.
>> If there is documentation in the work out there, would you share it with
>> us please?
>>
>>
>> On Sun, Mar 31, 2019 at 6:57 AM Alexey Bataev <*a.bataev at hotmail.com*
>> <a.bataev at hotmail.com>> wrote:
>> Hi Itaru, yes, it is not easy work to do. We discussed it again a few
>> days ago and it still requires some additional work.
>>
>> Best regards,
>> Alexey Bataev
>>
>> > 30 марта 2019 г., в 16:59, Itaru Kitayama via Openmp-dev <
>> *openmp-dev at lists.llvm.org* <openmp-dev at lists.llvm.org>> написал(а):
>> >
>> > Hi,
>> > Is building a static library of OpenMP still designed to be
>> > difficult to accomplish in the trunk?
>> > _______________________________________________
>> > Openmp-dev mailing list
>> > *Openmp-dev at lists.llvm.org* <Openmp-dev at lists.llvm.org>
>> > *https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev*
>> <https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev>*[attachment
>> "signature.asc" deleted by Gheorghe-Teod Bercea/US/IBM] *
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190430/90a07481/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noname
Type: image/jpeg
Size: 525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190430/90a07481/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: noname
Type: image/jpeg
Size: 120662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190430/90a07481/attachment-0003.jpe>


More information about the Openmp-dev mailing list