Commit baa8240
cmake: Add option USE_LINKER to specify linker and prefer lld by default
This change adds USE_LINKER option to cmake that allows for changing the
linker that's going to be used. If not specified, it's gonna probe the
system for a few linkers in some predetermined order and select the
first one that's available. The preference looks like this right now:
`[lld, ld]``, so if you have lld installed on your machine cmake is
automatically going to use it to link for faster build times.
Prior to this change, we just used GNU ld linker which is quite slow.
Note that this option only targets linux systems.1 parent 1ce1fc9 commit baa8240
1 file changed
+59
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1720 | 1720 | | |
1721 | 1721 | | |
1722 | 1722 | | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
1723 | 1782 | | |
1724 | 1783 | | |
1725 | 1784 | | |
| |||
0 commit comments