From 95ad47ca7d8ed455bd19713dbb44b58ad9bb6d07 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 27 Sep 2022 11:53:08 +0800 Subject: [PATCH] Bump mold version to 1.5.0 --- CMakeLists.txt | 2 +- Makefile | 2 +- README.md | 25 ++++++++++++++----------- install-build-deps.sh | 4 +++- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5000dd094a..dcbfc2d530 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.13) -project(mold VERSION 1.4.2) +project(mold VERSION 1.5.0) include(CMakeDependentOption) include(GNUInstallDirs) diff --git a/Makefile b/Makefile index cf7809319e..148235d851 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 1.4.2 +VERSION = 1.5.0 PREFIX = /usr/local BINDIR = $(PREFIX)/bin diff --git a/README.md b/README.md index 54a136d1d5..799105fbb7 100644 --- a/README.md +++ b/README.md @@ -61,25 +61,28 @@ necessary packages. You may want to run it as root. ```shell git clone https://github.com/rui314/mold.git -cd mold -git checkout v1.4.2 -make -j$(nproc) CXX=clang++ -sudo make install +mkdir mold/build +cd mold/build +git checkout v1.5.0 +../install-build-deps.sh +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++ .. +cmake --build . -j $(nproc) +sudo cmake --install . ``` -You may need to pass a C++20 compiler command name to `make`. -In the above case, `clang++` is passed. If it doesn't work for you, +You may need to pass a C++20 compiler command name to `cmake`. +In the above case, `c++` is passed. If it doesn't work for you, try a specific version of a compiler such as `g++-10` or `clang++-12`. By default, `mold` is installed to `/usr/local/bin`. If you don't use a recent enough Linux distribution, or if for any reason -`make` in the above commands doesn't work for you, you can use Docker to +`cmake` in the above commands doesn't work for you, you can use Docker to build it in a Docker environment. To do so, just run `./dist.sh` in this -directory instead of running `make -j$(nproc)`. The shell script pulls a -Docker image, builds mold and auxiliary files inside it, and packs -them into a single tar file `mold-$version-$arch-linux.tar.gz`. -You can extract the tar file anywhere and use `mold` executable in it. +directory instead of `cmake`. The shell script pulls a Docker image, +builds mold and auxiliary files inside it, and packs them into a +single tar file `mold-$version-$arch-linux.tar.gz`. You can extract +the tar file anywhere and use `mold` executable in it. ## How to use diff --git a/install-build-deps.sh b/install-build-deps.sh index 654172e264..3c919a4d5d 100755 --- a/install-build-deps.sh +++ b/install-build-deps.sh @@ -1,7 +1,9 @@ -#!/bin/bash -x +#!/bin/bash set -e source /etc/os-release +set -x + # The first line for each distro installs a build dependency. # The second line installs extra packages for `make test`. #