forked from premiere/premiere-libtorrent
added option to disable invariant checks and added more build documentation
This commit is contained in:
parent
9304bd747c
commit
795bee4b2c
3
Jamfile
3
Jamfile
|
@ -152,6 +152,9 @@ rule building ( properties * )
|
||||||
feature bandwidth-limit-logging : off on : composite propagated link-incompatible ;
|
feature bandwidth-limit-logging : off on : composite propagated link-incompatible ;
|
||||||
feature.compose <bandwidth-limit-logging>on : <define>TORRENT_VERBOSE_BANDWIDTH_LIMIT ;
|
feature.compose <bandwidth-limit-logging>on : <define>TORRENT_VERBOSE_BANDWIDTH_LIMIT ;
|
||||||
|
|
||||||
|
feature invariant-checks : on off : composite propagated link-incompatible ;
|
||||||
|
feature.compose <invariant-checks>off : <define>TORRENT_DISABLE_INVARIANT_CHECKS ;
|
||||||
|
|
||||||
feature disk-stats : off on : composite propagated link-incompatible ;
|
feature disk-stats : off on : composite propagated link-incompatible ;
|
||||||
feature.compose <disk-stats>on : <define>TORRENT_DISK_STATS ;
|
feature.compose <disk-stats>on : <define>TORRENT_DISK_STATS ;
|
||||||
|
|
||||||
|
|
|
@ -291,6 +291,26 @@ API is used.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr><td><tt class="docutils literal"><span class="pre">invariant-checks</span></tt></td>
|
||||||
|
<td><p class="first">This setting only affects debug builds (where
|
||||||
|
<tt class="docutils literal"><span class="pre">NDEBUG</span></tt> is not defined). It defaults to <tt class="docutils literal"><span class="pre">on</span></tt>.</p>
|
||||||
|
<ul class="last simple">
|
||||||
|
<li><tt class="docutils literal"><span class="pre">on</span></tt> - internal invariant checks are enabled.</li>
|
||||||
|
<li><tt class="docutils literal"><span class="pre">off</span></tt> - internal invariant checks are
|
||||||
|
disabled. The resulting executable will run
|
||||||
|
faster than a regular debug build.</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td><tt class="docutils literal"><span class="pre">debug-symbols</span></tt></td>
|
||||||
|
<td><ul class="first last simple">
|
||||||
|
<li><tt class="docutils literal"><span class="pre">on</span></tt> - default for debug builds. This setting
|
||||||
|
is useful for building release builds with
|
||||||
|
symbols.</li>
|
||||||
|
<li><tt class="docutils literal"><span class="pre">off</span></tt> - default for release builds.</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>The <tt class="docutils literal"><span class="pre">variant</span></tt> feature is <em>implicit</em>, which means you don't need to specify
|
<p>The <tt class="docutils literal"><span class="pre">variant</span></tt> feature is <em>implicit</em>, which means you don't need to specify
|
||||||
|
@ -558,6 +578,14 @@ non-ansi characters.</td>
|
||||||
<td>Defining this will disable the ability to
|
<td>Defining this will disable the ability to
|
||||||
resolve countries of origin for peer IPs.</td>
|
resolve countries of origin for peer IPs.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr><td><tt class="docutils literal"><span class="pre">TORRENT_DISABLE_INVARIANT_CHECKS</span></tt></td>
|
||||||
|
<td>This will disable internal invariant checks in
|
||||||
|
libtorrent. The invariant checks can sometime
|
||||||
|
be quite expensive, they typically don't scale
|
||||||
|
very well. This option can be used to still
|
||||||
|
build in debug mode, with asserts enabled, but
|
||||||
|
make the resulting executable faster.</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>If you experience that libtorrent uses unreasonable amounts of cpu, it will
|
<p>If you experience that libtorrent uses unreasonable amounts of cpu, it will
|
||||||
|
|
|
@ -262,6 +262,19 @@ Build features:
|
||||||
| | * ``unicode`` - The unicode version of the win32 |
|
| | * ``unicode`` - The unicode version of the win32 |
|
||||||
| | API is used. |
|
| | API is used. |
|
||||||
+------------------------+----------------------------------------------------+
|
+------------------------+----------------------------------------------------+
|
||||||
|
| ``invariant-checks`` | This setting only affects debug builds (where |
|
||||||
|
| | ``NDEBUG`` is not defined). It defaults to ``on``. |
|
||||||
|
| | |
|
||||||
|
| | * ``on`` - internal invariant checks are enabled. |
|
||||||
|
| | * ``off`` - internal invariant checks are |
|
||||||
|
| | disabled. The resulting executable will run |
|
||||||
|
| | faster than a regular debug build. |
|
||||||
|
+------------------------+----------------------------------------------------+
|
||||||
|
| ``debug-symbols`` | * ``on`` - default for debug builds. This setting |
|
||||||
|
| | is useful for building release builds with |
|
||||||
|
| | symbols. |
|
||||||
|
| | * ``off`` - default for release builds. |
|
||||||
|
+------------------------+----------------------------------------------------+
|
||||||
|
|
||||||
The ``variant`` feature is *implicit*, which means you don't need to specify
|
The ``variant`` feature is *implicit*, which means you don't need to specify
|
||||||
the name of the feature, just the value.
|
the name of the feature, just the value.
|
||||||
|
@ -527,6 +540,13 @@ defines you can use to control the build.
|
||||||
| ``TORRENT_DISABLE_RESOLVE_COUNTRIES`` | Defining this will disable the ability to |
|
| ``TORRENT_DISABLE_RESOLVE_COUNTRIES`` | Defining this will disable the ability to |
|
||||||
| | resolve countries of origin for peer IPs. |
|
| | resolve countries of origin for peer IPs. |
|
||||||
+---------------------------------------+-------------------------------------------------+
|
+---------------------------------------+-------------------------------------------------+
|
||||||
|
| ``TORRENT_DISABLE_INVARIANT_CHECKS`` | This will disable internal invariant checks in |
|
||||||
|
| | libtorrent. The invariant checks can sometime |
|
||||||
|
| | be quite expensive, they typically don't scale |
|
||||||
|
| | very well. This option can be used to still |
|
||||||
|
| | build in debug mode, with asserts enabled, but |
|
||||||
|
| | make the resulting executable faster. |
|
||||||
|
+---------------------------------------+-------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
If you experience that libtorrent uses unreasonable amounts of cpu, it will
|
If you experience that libtorrent uses unreasonable amounts of cpu, it will
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#if !defined NDEBUG && !defined TORRENT_DISABLE_INVARIANT_CHECKS
|
||||||
#define INVARIANT_CHECK \
|
#define INVARIANT_CHECK \
|
||||||
invariant_checker const& _invariant_check = make_invariant_checker(*this); \
|
invariant_checker const& _invariant_check = make_invariant_checker(*this); \
|
||||||
(void)_invariant_check; \
|
(void)_invariant_check; \
|
||||||
|
|
Loading…
Reference in New Issue