From a2acbbd03995ef54eb806011ffaaeca05d4c71da Mon Sep 17 00:00:00 2001 From: w1nst0n Date: Sat, 2 Oct 2021 00:00:28 +0200 Subject: [PATCH] Use lld (faster) linker for linux builds --- .cargo/config | 5 ++++- .gitlab-ci.yml | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cargo/config b/.cargo/config index d0b4a01..ecd4a93 100644 --- a/.cargo/config +++ b/.cargo/config @@ -6,4 +6,7 @@ ar = "/usr/bin/x86_64-w64-mingw32-ar" linker = "/usr/bin/i686-w64-mingw32-gcc" [target.x86_64-pc-windows-msvc] -rustflags = ["-C", "target-feature=+crt-static"] \ No newline at end of file +rustflags = ["-C", "target-feature=+crt-static"] + +[target.x86_64-unknown-linux-gnu] +rustflags = ["-C", "link-arg=-fuse-ld=lld"] diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb3b3bb..951a8e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ i686-pc-windows-gnu: stage: build before_script: - - apt update -yqq && apt install -yqq mingw-w64 + - apt update -yqq && apt install -yqq mingw-w64 lld - rustup target add i686-pc-windows-gnu script: @@ -27,7 +27,7 @@ x86_64-pc-windows-gnu: stage: build before_script: - - apt update -yqq && apt install -yqq mingw-w64 + - apt update -yqq && apt install -yqq mingw-w64 lld - rustup target add x86_64-pc-windows-gnu script: @@ -44,7 +44,7 @@ x86_64-unknown-linux-gnu: stage: build before_script: - - apt update -yqq && apt install -yqq libxkbcommon-dev + - apt update -yqq && apt install -yqq libxkbcommon-dev lld script: - cargo build --features glow --release --target x86_64-unknown-linux-gnu