From 452cd7e3bee6a28b40949dfeed9f87835551a7cc Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Tue, 26 Jan 2021 11:49:03 +0100 Subject: [PATCH] docs: Update macos doc to clang-format Type: docs Change-Id: Ibf825ac8b1591e8109be0b3b8d56ee85ae5145a4 Signed-off-by: Nathan Skrzypczak --- .../developers/cross_compile_macos.rst | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/gettingstarted/developers/cross_compile_macos.rst b/docs/gettingstarted/developers/cross_compile_macos.rst index c5934bc9c25..5eec5569a8b 100644 --- a/docs/gettingstarted/developers/cross_compile_macos.rst +++ b/docs/gettingstarted/developers/cross_compile_macos.rst @@ -13,17 +13,14 @@ This is a first attempt to support Cross compilation of VPP on MacOS for develop .. code-block:: console $ pip3 install ply pyyaml jsonschema - $ brew install diffutils gnu-sed pkg-config ninja crosstool-ng + $ brew install gnu-sed pkg-config ninja crosstool-ng -* You'll also need to install ``gnu-ident 2.2.11`` to be able to ``make checkstyle``. This can be done with :ref:`this doc` +* 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` * 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 - $ ln -s $(which gindent) /usr/local/bin/indent - $ ln -s /usr/local/Cellar/diffutils/3.7/bin/diff /usr/local/bin/diff - **Setup** @@ -54,19 +51,20 @@ This should build vpp on MacOS Good luck :) -.. _install_indent_2_2_11 : +.. _install_clang_format_10_0_0 : -Installing indent 2.2.11 ------------------------- +Installing clang-format 10.0.0 +------------------------------ -In order to install indent on macos : +In order to install clang-format on macos : .. code-block:: bash - $ wget http://mirror.sergal.org/gnu/indent/indent-2.2.11.tar.gz - $ tar -xzvf indent-2.2.11.tar.gz - $ cd indent-2.2.11 - $ ./configure --disable-dependency-tracking --disable-debug --program-prefix=g --prefix=/usr/local/Cellar/gnu-indent/2.2.11 + $ 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 -Install will exit with an error code, but indent 2.2.11 will still be installed in ``/usr/local/bin/gindent`` -Other mirrors can be found on the `GNU website `_ +Source `Clang website `_ -- 2.16.6