@@ -61,25 +61,28 @@ necessary packages. You may want to run it as root.
6161
6262``` shell
6363git clone https://github.com/rui314/mold.git
64- cd mold
65- git checkout v1.4.2
66- make -j$( nproc) CXX=clang++
67- sudo make install
64+ mkdir mold/build
65+ cd mold/build
66+ git checkout v1.5.0
67+ ../install-build-deps.sh
68+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++ ..
69+ cmake --build . -j $( nproc)
70+ sudo cmake --install .
6871```
6972
70- You may need to pass a C++20 compiler command name to ` make ` .
71- In the above case, ` clang ++` is passed. If it doesn't work for you,
73+ You may need to pass a C++20 compiler command name to ` cmake ` .
74+ In the above case, ` c ++` is passed. If it doesn't work for you,
7275try a specific version of a compiler such as ` g++-10 ` or ` clang++-12 ` .
7376
7477By default, ` mold ` is installed to ` /usr/local/bin ` .
7578
7679If you don't use a recent enough Linux distribution, or if for any reason
77- ` make ` in the above commands doesn't work for you, you can use Docker to
80+ ` cmake ` in the above commands doesn't work for you, you can use Docker to
7881build it in a Docker environment. To do so, just run ` ./dist.sh ` in this
79- directory instead of running ` make -j$(nproc) ` . The shell script pulls a
80- Docker image, builds mold and auxiliary files inside it, and packs
81- them into a single tar file ` mold-$version-$arch-linux.tar.gz ` .
82- You can extract the tar file anywhere and use ` mold ` executable in it.
82+ directory instead of ` cmake ` . The shell script pulls a Docker image,
83+ builds mold and auxiliary files inside it, and packs them into a
84+ single tar file ` mold-$version-$arch-linux.tar.gz ` . You can extract
85+ the tar file anywhere and use ` mold ` executable in it.
8386
8487## How to use
8588
0 commit comments