diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2021-08-19 11:38:06 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2021-10-13 23:22:32 +0000 |
commit | 9ad39c026c8a3c945a7003c4aa4f5cb1d4c80160 (patch) | |
tree | 3cca19635417e28ae381d67ae31c75df2925032d /docs/developer/build-run-debug/cross_compile_macos.rst | |
parent | f47122e07e1ecd0151902a3cabe46c60a99bee8e (diff) |
docs: better docs, mv doxygen to sphinx
This patch refactors the VPP sphinx docs
in order to make it easier to consume
for external readers as well as VPP developers.
It also makes sphinx the single source
of documentation, which simplifies maintenance
and operation.
Most important updates are:
- reformat the existing documentation as rst
- split RELEASE.md and move it into separate rst files
- remove section 'events'
- remove section 'archive'
- remove section 'related projects'
- remove section 'feature by release'
- remove section 'Various links'
- make (Configuration reference, CLI docs,
developer docs) top level items in the list
- move 'Use Cases' as part of 'About VPP'
- move 'Troubleshooting' as part of 'Getting Started'
- move test framework docs into 'Developer Documentation'
- add a 'Contributing' section for gerrit,
docs and other contributer related infos
- deprecate doxygen and test-docs targets
- redirect the "make doxygen" target to "make docs"
Type: refactor
Change-Id: I552a5645d5b7964d547f99b1336e2ac24e7c209f
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'docs/developer/build-run-debug/cross_compile_macos.rst')
-rw-r--r-- | docs/developer/build-run-debug/cross_compile_macos.rst | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/docs/developer/build-run-debug/cross_compile_macos.rst b/docs/developer/build-run-debug/cross_compile_macos.rst new file mode 100644 index 00000000000..5eec5569a8b --- /dev/null +++ b/docs/developer/build-run-debug/cross_compile_macos.rst @@ -0,0 +1,70 @@ +.. _cross_compile_macos : + +Cross compilation on MacOS +========================== + +This is a first attempt to support Cross compilation of VPP on MacOS for development (linting, completion, compile_commands.json) + + +**Prerequisites** + +* You'll need to install the following packages + +.. code-block:: console + + $ pip3 install ply pyyaml jsonschema + $ brew install gnu-sed pkg-config ninja crosstool-ng + +* You'll also need to install ``clang-format 10.0.0`` to be able to ``make checkstyle``. This can be done with :ref:`this doc<install_clang_format_10_0_0>` +* You should link the binaries to make them available in your path with their original names e.g. : + +.. code-block:: console + + $ ln -s $(which gsed) /usr/local/bin/sed + +**Setup** + +* Create a `cross compile toolchain <https://crosstool-ng.github.io/>`_ +* Create a case sensitive volume and mount the toolchain in it e.g. in ``/Volumes/xchain`` +* Create a xchain.toolchain file with ``$VPP_DIR/extras/scripts/cross_compile_macos.sh conf /Volumes/xchan`` + +For now we don't support e-build so dpdk, rdma, quicly won't be compiled as part of ``make build`` + +To build with the toolchain do: + +.. code-block:: console + + $ $VPP_DIR/extras/scripts/cross_compile_macos.sh build + + +To get the compile_commands.json do + +.. code-block:: console + + $ $VPP_DIR/extras/scripts/cross_compile_macos.sh cc + $ >> ./build-root/build-vpp[_debug]-native/vpp/compile_commands.json + + + +This should build vpp on MacOS + + +Good luck :) + +.. _install_clang_format_10_0_0 : + +Installing clang-format 10.0.0 +------------------------------ + +In order to install clang-format on macos : + +.. code-block:: bash + + $ wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang-10.0.0.src.tar.xz + $ tar -xvf clang+llvm-10.0.0-x86_64-apple-darwin.tar.xz + $ mv clang+llvm-10.0.0-x86_64-apple-darwin /usr/local/Cellar/ + $ sudo ln -s ../Cellar/clang+llvm-10.0.0-x86_64-apple-darwin/bin/clang-format /usr/local/bin/clang-format + $ sudo ln -s ../Cellar/clang+llvm-10.0.0-x86_64-apple-darwin/bin/clang-format /usr/local/bin/clang-format-10 + $ sudo ln -s ../Cellar/clang+llvm-10.0.0-x86_64-apple-darwin/share/clang/clang-format-diff.py /usr/local/bin/clang-format-diff-10 + +Source `Clang website <https://releases.llvm.org/download.html#git>`_ |