bitcoin-tidy: fix macOS build #28258

pull theuni wants to merge 1 commits into bitcoin:master from theuni:bitcoin-tidy-macos changing 1 files +12 −1
  1. theuni commented at 1:03 PM on August 11, 2023: member

    LLVM uses these options for building as well, so there's precedent.

    Also fix the shared library extension which was incorrectly being set to dylib.

    Thanks to jonatack for reporting and debugging.

  2. bitcoin-tidy: fix macOS build
    LLVM uses these options for building as well, so there's precedent.
    
    Also fix the shared library extension which was incorrectly being set to dylib
    bb3263d3e3
  3. DrahtBot commented at 1:03 PM on August 11, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK jonatack

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. jonatack approved
  5. jonatack commented at 2:55 AM on August 12, 2023: member

    ACK bb3263d3e3d9f9d4db86dde679f469e7278bf737 tested with arm64 macos 13.5, llvm 16.0.6 and cmake 3.27.2

    Did not test with cmake earlier than 3.27.

    Note to testers, see the /contrib/devtools/bitcoin-tidy/README on current master at 3654d84c6f5 for the updated example usage docs.

    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ cmake --version                                                                    
    cmake version 3.27.2
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ cmake -S . -B build -DLLVM_DIR=$(llvm-config --cmakedir) -DCMAKE_BUILD_TYPE=Release
    -- Found LLVM 16.0.6
    -- Found clang-tidy: /opt/homebrew/Cellar/llvm/16.0.6/bin/clang-tidy
    -- Configuring done (0.1s)
    -- Generating done (0.0s)
    -- Build files have been written to: /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/build
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ cmake --build build -j11                                                           
    [100%] Built target bitcoin-tidy
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ rm -rf build                                                                                        
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ 
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ cmake --version                                                                    
    cmake version 3.27.2
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ cmake -S . -B build -DLLVM_DIR=$(llvm-config --cmakedir) -DCMAKE_BUILD_TYPE=Release
    -- The C compiler identification is AppleClang 14.0.3.14030022
    -- The CXX compiler identification is AppleClang 14.0.3.14030022
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /opt/homebrew/opt/ccache/libexec/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /opt/homebrew/opt/ccache/libexec/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Performing Test HAVE_FFI_CALL
    -- Performing Test HAVE_FFI_CALL - Success
    -- Found FFI: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libffi.tbd  
    -- Performing Test Terminfo_LINKABLE
    -- Performing Test Terminfo_LINKABLE - Success
    -- Found Terminfo: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libcurses.tbd  
    -- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libz.tbd (found version "1.2.11")  
    -- Found zstd: /opt/homebrew/lib/libzstd.dylib  
    -- Found LibXml2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libxml2.tbd (found version "2.9.13") 
    -- Found LLVM 16.0.6
    -- Found clang-tidy: /opt/homebrew/Cellar/llvm/16.0.6/bin/clang-tidy
    -- Configuring done (1.4s)
    -- Generating done (0.0s)
    -- Build files have been written to: /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/build
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ cmake --build build -j11                                                           
    [ 66%] Building CXX object CMakeFiles/bitcoin-tidy.dir/logprintf.cpp.o
    [ 66%] Building CXX object CMakeFiles/bitcoin-tidy.dir/bitcoin-tidy.cpp.o
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/logprintf.cpp:12:1: warning: unused parameter 'Finder' [-Wunused-parameter]
    AST_MATCHER(clang::StringLiteral, unterminated)
    ^
    /opt/homebrew/Cellar/llvm/16.0.6/include/clang/ASTMatchers/ASTMatchersMacros.h:112:56: note: expanded from macro 'AST_MATCHER'
          ::clang::ast_matchers::internal::ASTMatchFinder *Finder,                 \
                                                           ^
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/logprintf.cpp:12:1: warning: unused parameter 'Builder' [-Wunused-parameter]
    /opt/homebrew/Cellar/llvm/16.0.6/include/clang/ASTMatchers/ASTMatchersMacros.h:113:63: note: expanded from macro 'AST_MATCHER'
          ::clang::ast_matchers::internal::BoundNodesTreeBuilder *Builder) const
                                                                  ^
    2 warnings generated.
    [100%] Linking CXX shared module libbitcoin-tidy.so
    [100%] Built target bitcoin-tidy
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ cmake --build build --target bitcoin-tidy-tests -j11                               
    [ 75%] Built target bitcoin-tidy
    [100%] Building CXX object CMakeFiles/bitcoin-tidy-tests.dir/example_logprintf.cpp.o
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:65:15: warning: Unterminated format string used with LogPrintf [bitcoin-unterminated-logprintf]
        LogPrintf("hello world!");
                  ^
                               \n
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:22:68: note: expanded from macro 'LogPrintf'
    #define LogPrintf(...) LogPrintLevel_(LogFlags::NONE, Level::None, __VA_ARGS__)
                                                                       ^
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:21:104: note: expanded from macro 'LogPrintLevel_'
    #define LogPrintLevel_(category, level, ...) LogPrintf_(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
                                                                                                           ^
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:69:15: warning: Unterminated format string used with LogPrintf [bitcoin-unterminated-logprintf]
        LogPrintf("");
                  ^
                   \n
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:22:68: note: expanded from macro 'LogPrintf'
    #define LogPrintf(...) LogPrintLevel_(LogFlags::NONE, Level::None, __VA_ARGS__)
                                                                       ^
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:21:104: note: expanded from macro 'LogPrintLevel_'
    #define LogPrintLevel_(category, level, ...) LogPrintf_(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
                                                                                                           ^
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:74:15: warning: Unterminated format string used with LogPrintf [bitcoin-unterminated-logprintf]
        LogPrintf("hello world!...");
                  ^
                                  \n
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:22:68: note: expanded from macro 'LogPrintf'
    #define LogPrintf(...) LogPrintLevel_(LogFlags::NONE, Level::None, __VA_ARGS__)
                                                                       ^
    /Users/jon/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy/example_logprintf.cpp:21:104: note: expanded from macro 'LogPrintLevel_'
    #define LogPrintLevel_(category, level, ...) LogPrintf_(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__)
                                                                                                           ^
    [100%] Built target bitcoin-tidy-tests
    jon|(bb3263d3e3d...):~/bitcoin/bitcoin/contrib/devtools/bitcoin-tidy$ 
    
  6. fanquake merged this on Aug 14, 2023
  7. fanquake closed this on Aug 14, 2023

  8. sidhujag referenced this in commit fe8251920e on Aug 15, 2023
  9. bitcoin locked this on Aug 15, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me