1
0
mirror of synced 2025-02-17 18:59:21 +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

@ -45,7 +45,10 @@ jobs:
CC=gcc-10 CXX=g++-10 cmake \ CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \ -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 make -j 4 install

View File

@ -53,7 +53,10 @@ jobs:
CC=gcc-10 CXX=g++-10 cmake \ CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \ -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" \
-DRUST_PATH="$HOME/.cargo/bin/" \ -DRUST_PATH="$HOME/.cargo/bin/" \
.. ..
make -j 4 install make -j 4 install
@ -128,6 +131,7 @@ jobs:
msystem: mingw64 msystem: mingw64
pacboy: >- pacboy: >-
gcc:p gcc:p
lld:p
cmake:p cmake:p
make:p make:p
ccache:p ccache:p
@ -174,7 +178,10 @@ jobs:
-DCMAKE_INSTALL_PREFIX="$PWD/install" \ -DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DCREATE_PACKAGE=ON \ -DCREATE_PACKAGE=ON \
-DPython_LIBRARY="$PYTHON_LIB_PATH" \ -DPython_LIBRARY="$PYTHON_LIB_PATH" \
-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" \
-DRUST_PATH="$USERPROFILE/.cargo/bin/" \ -DRUST_PATH="$USERPROFILE/.cargo/bin/" \
.. ..
mingw32-make -j4 install mingw32-make -j4 install
@ -229,7 +236,10 @@ jobs:
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCREATE_BUNDLE=ON \ -DCREATE_BUNDLE=ON \
-DCREATE_PACKAGE=ON \ -DCREATE_PACKAGE=ON \
-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 package make -j4 package

View File

@ -42,7 +42,10 @@ jobs:
CC=gcc-10 CXX=g++-10 cmake \ CC=gcc-10 CXX=g++-10 cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \ -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 make -j4 unit_tests install

View File

@ -3,6 +3,7 @@
pacman -S --needed \ pacman -S --needed \
cmake \ cmake \
gcc \ gcc \
lld \
glfw \ glfw \
file \ file \
mbedtls \ mbedtls \

View File

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

View File

@ -3,6 +3,7 @@
dnf install \ dnf install \
cmake \ cmake \
gcc-c++ \ gcc-c++ \
lld \
file-devel \ file-devel \
glfw-devel \ glfw-devel \
mesa-libGL-devel \ mesa-libGL-devel \

View File

@ -2,6 +2,7 @@
pacman -S --needed --noconfirm \ pacman -S --needed --noconfirm \
mingw-w64-x86_64-gcc \ mingw-w64-x86_64-gcc \
mingw-w64-x86_64-lld \
mingw-w64-x86_64-cmake \ mingw-w64-x86_64-cmake \
mingw-w64-x86_64-make \ mingw-w64-x86_64-make \
mingw-w64-x86_64-ccache \ mingw-w64-x86_64-ccache \

1
dist/msys2/PKGBUILD vendored
View File

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