comparison lib/openmp/openmp.sh @ 350:819d906b465d

vanilla: create pure LLVM toolchain - dev/lld is imported - dev/llvm is built with libc++ - lib/compiler-rt is imported and used - lib/libc++ is built with libunwind/libc++abi - lib/libunwind is imported - lib/openmp is imported
author David Demelier <markand@malikania.fr>
date Thu, 28 Mar 2019 20:58:49 +0100
parents
children 8c3b3f637811
comparison
equal deleted inserted replaced
349:7b000befead5 350:819d906b465d
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 PKGNAME=openmp
19 PKGVERSION=8.0.0
20 PKGREVISION=1
21 PKGLICENSE="CUSTOM"
22 PKGSUMMARY=""
23 PKGDOWNLOAD="http://releases.llvm.org/$PKGVERSION/$PKGNAME-$PKGVERSION.src.tar.xz"
24
25 : ${CC:=clang}
26 : ${CFLAGS:=-O2}
27 : ${CXX:=clang++}
28 : ${CXXFLAGS:=-O2}
29
30 build()
31 {
32 rm -rf $PKGNAME-$PKGVERSION.src
33 tar xvaf $PKGNAME-$PKGVERSION.src.tar.xz
34 pushd $PKGNAME-$PKGVERSION.src
35
36 mkdir build && pushd build
37 cmake .. \
38 -DBUILD_SHARED_LIBS=On \
39 -DCMAKE_BUILD_TYPE=Release \
40 -DCMAKE_CXX_COMPILER="$CXX" \
41 -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
42 -DCMAKE_C_COMPILER="$CC" \
43 -DCMAKE_C_FLAGS="$CFLAGS" \
44 -DCMAKE_INSTALL_PREFIX=/usr
45 make
46 make install DESTDIR=$DESTDIR
47 popd
48
49 popd
50 rm -rf $PKGNAME-$PKGVERSION.src
51 }