1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-21 18:08:01 +03:00
Commit Graph

9 Commits

Author SHA1 Message Date
Rui Ueyama
76018da068 Remove dependency to OpenSSL's RAND_bytes 2021-09-05 17:02:08 +09:00
Rui Ueyama
e4e8535345 Remove CMakeLists.txt
I was experimenting with cmake to see if it is useful for mold,
but it looks like using cmake doesn't make much sense for us.
So I'm undoing all changes that I did for cmake.

cmake is definitely better than autoconf, and it is also useful
if your program is cross-platform. However, neither of the benefits
don't apply to mold; mold doesn't need a complex feature detection,
and it currently supports only ELF-based Unix-like systems.

I think Makefile is a lingua-franca, while CMakeLists.txt isn't.
The good ol' Makefile works just fine for mold.

In the future, mold might become a cross-platform product, and if
that happens, we might want to re-introduce cmake.
2021-07-21 16:27:29 +09:00
Rui Ueyama
e13b1180af Make cmake to accept -DMOLD_BUILD_STATIC_EXE flags 2021-07-20 23:22:27 +09:00
Rui Ueyama
fe26dad744 Fix cmake build
You can now build mold with the following commands:

  $ mkdir -p out/debug
  $ cd out/debug
  $ cmake -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug ../..
  $ ninja

To run tests, use the following commands:

  $ cd out/debug
  $ ctest -j$(nproc)
2021-07-20 00:33:28 +09:00
Rui Ueyama
3e3d58b6f1 Static-link oneTBB by default
oneTBB API is changing rapidly, so even if a oneTBB is installed
into a system already, it is likely that that is not a compatible
version with mold. This makes program building unnecessarily hard.

This change intends to solve the problem once and for all by
including oneTBB as a subdirectory and static-link against it at
build-time.

oneTBB is released under the Apache License 2.0, which is compatible
with AGPL. Therefore, we can still distribute the binary of mold
under AGPL.

If you do not want to static-link oneTBB, pass `SYSTEM_TBB=1`
to `make`.

This change also ports mold from oneTBB v2020.3 to v2021.3.0.

Fixes https://github.com/rui314/mold/issues/66
2021-07-03 00:08:33 +09:00
Rui Ueyama
be34b9c26f Remove an existing file if it is not statically-linked 2021-05-25 15:49:42 +09:00
Rui Ueyama
a69f4c8b60 Exit immediately if a command fails 2021-05-21 12:50:11 +09:00
Rui Ueyama
d01fbc4b2e Simplify 2021-05-20 15:02:13 +09:00
Rui Ueyama
effadb0296 Update build procedure 2021-05-18 16:57:54 +09:00