提交 cd41008d authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

doc/Building.md: improve 'invoke tidy' doc

上级 8f640d0b
...@@ -153,7 +153,7 @@ Check the meaning of useful macros in the `worker/include/Logger.hpp` header fil ...@@ -153,7 +153,7 @@ Check the meaning of useful macros in the `worker/include/Logger.hpp` header fil
Binary is built at `worker/out/MEDIASOUP_BUILDTYPE/build`. Binary is built at `worker/out/MEDIASOUP_BUILDTYPE/build`.
In order to instruct the mediasoup Node.js module to use the "Debug"` `mediasoup-worker` binary, an environment variable must be set before running the Node.js application: In order to instruct the mediasoup Node.js module to use the "Debug" mediasoup-worker` binary, an environment variable must be set before running the Node.js application:
```bash ```bash
MEDIASOUP_BUILDTYPE=Debug node myapp.js MEDIASOUP_BUILDTYPE=Debug node myapp.js
...@@ -198,8 +198,6 @@ Runs [clang-tidy](http://clang.llvm.org/extra/clang-tidy) and performs C++ code ...@@ -198,8 +198,6 @@ Runs [clang-tidy](http://clang.llvm.org/extra/clang-tidy) and performs C++ code
**Requirements:** **Requirements:**
- `invoke clean` and `invoke mediasoup-worker` must have been called first. - `invoke clean` and `invoke mediasoup-worker` must have been called first.
- [PyYAML](https://pyyaml.org) is required.
- In OSX install it with `brew install libyaml` and `sudo easy_install-X.Y pyyaml`.
- [clang-tools-extra](https://clang.llvm.org/extra) is required. - [clang-tools-extra](https://clang.llvm.org/extra) is required.
- In OSX install it with `brew install llvm`. - In OSX install it with `brew install llvm`.
- In linux the package name is `clang-tools-extra`. - In linux the package name is `clang-tools-extra`.
...@@ -210,6 +208,12 @@ Runs [clang-tidy](http://clang.llvm.org/extra/clang-tidy) and performs C++ code ...@@ -210,6 +208,12 @@ Runs [clang-tidy](http://clang.llvm.org/extra/clang-tidy) and performs C++ code
- "MEDIASOUP_TIDY_FILES": Space separated source files to process, including their path. All `.cpp` files will be processes by default. - "MEDIASOUP_TIDY_FILES": Space separated source files to process, including their path. All `.cpp` files will be processes by default.
- "MEDIASOUP_CLANG_TIDY_DIR": Path to directory containing clang tools (`run-clang-tidy`, `clang-tidy`, `clang-apply-replacements`). - "MEDIASOUP_CLANG_TIDY_DIR": Path to directory containing clang tools (`run-clang-tidy`, `clang-tidy`, `clang-apply-replacements`).
**Usage example in macOS:**
```bash
MEDIASOUP_CLANG_TIDY_DIR=/usr/local/opt/llvm/bin invoke tidy
```
### `invoke fuzzer` ### `invoke fuzzer`
Builds the `mediasoup-worker-fuzzer` binary (which uses [libFuzzer](http://llvm.org/docs/LibFuzzer.html)) at `worker/out/Release` (or at `worker/out/Debug/` if the "MEDIASOUP_BUILDTYPE" environment variable is set to "Debug"). Builds the `mediasoup-worker-fuzzer` binary (which uses [libFuzzer](http://llvm.org/docs/LibFuzzer.html)) at `worker/out/Release` (or at `worker/out/Debug/` if the "MEDIASOUP_BUILDTYPE" environment variable is set to "Debug").
...@@ -217,8 +221,8 @@ Builds the `mediasoup-worker-fuzzer` binary (which uses [libFuzzer](http://llvm. ...@@ -217,8 +221,8 @@ Builds the `mediasoup-worker-fuzzer` binary (which uses [libFuzzer](http://llvm.
**Requirements:** **Requirements:**
- Linux with fuzzer capable clang++. - Linux with fuzzer capable clang++.
- `CC` environment variable must point to "clang". - "CC" environment variable must point to `clang`.
- `CXX` environment variable must point to "clang++". - "CXX" environment variable must point to `clang++`.
Read the [Fuzzer](Fuzzer.md) documentation for detailed information. Read the [Fuzzer](Fuzzer.md) documentation for detailed information.
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论