1
0
mirror of synced 2024-11-28 01:20:51 +01:00

build: Use ld.lld as linker

This commit is contained in:
WerWolv 2022-01-13 21:31:01 +01:00
parent 0864d582a2
commit 0986527495
8 changed files with 68 additions and 47 deletions

View File

@ -42,10 +42,13 @@ jobs:
run: |
mkdir -p build
cd build
CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
..
make -j 4 install

View File

@ -50,11 +50,14 @@ jobs:
run: |
mkdir -p build
cd build
CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DRUST_PATH="$HOME/.cargo/bin/" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DRUST_PATH="$HOME/.cargo/bin/" \
..
make -j 4 install
@ -128,6 +131,7 @@ jobs:
msystem: mingw64
pacboy: >-
gcc:p
lld:p
cmake:p
make:p
ccache:p
@ -169,13 +173,16 @@ jobs:
PYTHON_LIB_NAME=$(pkg-config --libs-only-l python3 | sed 's/^-l//' | sed 's/ //')
PYTHON_LIB_PATH=$(cygpath -m $(which lib${PYTHON_LIB_NAME}.dll))
cmake -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCREATE_PACKAGE=ON \
-DPython_LIBRARY="$PYTHON_LIB_PATH" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DRUST_PATH="$USERPROFILE/.cargo/bin/" \
cmake -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCREATE_PACKAGE=ON \
-DPython_LIBRARY="$PYTHON_LIB_PATH" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DRUST_PATH="$USERPROFILE/.cargo/bin/" \
..
mingw32-make -j4 install
cpack
@ -225,11 +232,14 @@ jobs:
CXX=$(brew --prefix llvm)/bin/clang++ \
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" \
MACOSX_DEPLOYMENT_TARGET="10.15" \
cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCREATE_BUNDLE=ON \
-DCREATE_PACKAGE=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCREATE_BUNDLE=ON \
-DCREATE_PACKAGE=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
..
make -j4 package

View File

@ -39,10 +39,13 @@ jobs:
run: |
mkdir -p build
cd build
CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_FLAGS="-fuse-ld=lld" \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
..
make -j4 unit_tests install

View File

@ -1,11 +1,12 @@
#!/usr/bin/env sh
pacman -S --needed \
cmake \
gcc \
glfw \
file \
mbedtls \
python3 \
cmake \
gcc \
lld \
glfw \
file \
mbedtls \
python3 \
freetype2 \
gtk3

View File

@ -14,6 +14,7 @@ apt install -y \
build-essential \
gcc-10 \
g++-10 \
lld \
${PKGCONF:-} \
cmake \
make \

View File

@ -1,12 +1,13 @@
#!/usr/bin/env sh
dnf install \
cmake \
gcc-c++ \
file-devel \
glfw-devel \
mesa-libGL-devel \
mbedtls-devel \
python-devel \
freetype-devel \
dnf install \
cmake \
gcc-c++ \
lld \
file-devel \
glfw-devel \
mesa-libGL-devel \
mbedtls-devel \
python-devel \
freetype-devel \
gtk3-devel

View File

@ -1,13 +1,14 @@
#!/usr/bin/env sh
pacman -S --needed --noconfirm \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-make \
mingw-w64-x86_64-ccache \
mingw-w64-x86_64-glfw \
mingw-w64-x86_64-file \
mingw-w64-x86_64-mbedtls \
mingw-w64-x86_64-python \
mingw-w64-x86_64-freetype \
pacman -S --needed --noconfirm \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-lld \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-make \
mingw-w64-x86_64-ccache \
mingw-w64-x86_64-glfw \
mingw-w64-x86_64-file \
mingw-w64-x86_64-mbedtls \
mingw-w64-x86_64-python \
mingw-w64-x86_64-freetype \
mingw-w64-x86_64-dlfcn

1
dist/msys2/PKGBUILD vendored
View File

@ -9,6 +9,7 @@ url="https://github.com/WerWolv/ImHex"
license=('GPLv2')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-lld"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-make"
"${MINGW_PACKAGE_PREFIX}-dlfcn"