Created
February 2, 2023 13:06
-
-
Save alifarazz/28da16c6f904973a2c7e450e5da64096 to your computer and use it in GitHub Desktop.
ccls-git PKGBUILD, uses LTO and other compiler optimizations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Obtained from: https://aur.archlinux.org/packages/ccls-git | |
# Maintainer: Fangrui Song <i at maskray.me> | |
# Co-Maintainer: Shengyu Zhang <[email protected]> | |
pkgname=ccls-git | |
_pkgname=ccls | |
pkgver=20230115 | |
pkgrel=1 | |
pkgdesc='C/C++ language server supporting cross references, hierarchies, completion and semantic highlighting' | |
arch=('x86_64') | |
url='https://github.com/MaskRay/ccls' | |
license=('Apache') | |
depends=('clang' 'llvm-libs' 'rapidjson') | |
makedepends=("cmake" "git" "llvm") | |
source=('git+https://github.com/MaskRay/ccls.git') | |
md5sums=('SKIP') | |
pkgver() { | |
cd $_pkgname | |
TZ=UTC date -d @$(git log -1 --format=%ct) +%Y%m%d | |
} | |
prepare() { | |
cd $_pkgname | |
#git submodule update --init | |
} | |
build() { | |
cd $_pkgname | |
cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
-DCLANG_LINK_CLANG_DYLIB=on \ | |
-DUSE_SYSTEM_RAPIDJSON=on \ | |
-DCMAKE_CXX_FLAGS_INIT="-mtune=native -march=native -Ofast -flto" \ | |
-DCMAKE_EXE_LINKER_FLAGS_INIT="-flto" | |
cmake --build build --config Release -j `nproc` | |
} | |
package() { | |
cd $_pkgname/build | |
make DESTDIR="$pkgdir" install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment