pcre2: bump to 10.40
[kiss-trunc88.git] / clang / build
blob5e77100fb83f47acb839f18165b50711ee1a9292
1 #!/bin/sh -e
3 export CFLAGS="-O2 -pipe -march=westmere -ftree-vectorize"
4 export CXXFLAGS="$CFLAGS"
6 mkdir -p cmake/modules
7 mv -f Modules/* cmake/modules/
8 mv -f modules/* cmake/modules/
10 cmake -B build \
11 -DCMAKE_INSTALL_PREFIX=/usr \
12 -DCMAKE_BUILD_TYPE=Release \
13 -DLLVM_ENABLE_RTTI=ON \
14 -DLLVM_ENABLE_EH=ON \
15 -DLLVM_ENABLE_LIBXML2=OFF \
16 -DCLANG_BUILD_EXAMPLES=OFF \
17 -DCLANG_INCLUDE_DOCS=OFF \
18 -DCLANG_INCLUDE_TESTS=OFF \
19 -DLIBCLANG_BUILD_STATIC=ON \
20 -Wno-dev
22 cmake --build build
23 cmake --install build
25 # Fix up libexec location. This can't be done during
26 # the configure stage of the build as it is hardcoded.
28 mv -f \
29 "$1/usr/libexec/"*analyze* \
30 "$1/usr/libexec/"*intercept* \
31 "$1/usr/lib/clang"
33 rmdir "$1/usr/libexec"
35 sed 's|libexec|lib/clang|' "$1/usr/bin/scan-build" > _
36 mv -f _ "$1/usr/bin/scan-build"
37 chmod +x "$1/usr/bin/scan-build"