Skip to content

Document Debug CMake build on Apple Silicon - #3548

Open
hesphoros wants to merge 3 commits into
apache:masterfrom
hesphoros:codex/docs-macos-debug-build
Open

hesphoros wants to merge 3 commits into
apache:masterfrom
hesphoros:codex/docs-macos-debug-build

Conversation

@hesphoros

Copy link
Copy Markdown

What problem does this PR solve?

Issue Number: N/A

Problem Summary:

The macOS documentation does not provide a verified CMake Debug build command for Apple Silicon or explain how to handle SDK selection and optional compilation database generation.

What is changed and the side effects?

Changed:

  • Add matching English and Chinese CMake Debug build instructions for Apple Silicon.
  • Discover Homebrew and macOS SDK paths dynamically.
  • Document CMAKE_EXPORT_COMPILE_COMMANDS as an optional setting for clangd and similar tools.
  • Add troubleshooting guidance for mismatched Command Line Tools and Xcode SDKs.
  • Ignore the documented build-debug output directory.

Side effects:

  • Performance effects: None; documentation only.

  • Breaking backward compatibility: None.

Verification

  • Configured a fresh Debug build on an Apple M4 without CMAKE_EXPORT_COMPILE_COMMANDS; confirmed that compile_commands.json was not generated.
  • Built brpc-static successfully with cmake --build <build-dir> --target brpc-static --parallel 4.
  • Verified libbrpc.a is an arm64 archive with lipo -info.

Check List:

  • The documented build command is compilable.
  • English and Chinese documentation are kept in sync.
  • The change follows the Contributor Covenant Code of Conduct.

@hesphoros
hesphoros marked this pull request as ready for review September 16, 2026 16:59
Copilot AI lite review requested due to automatic review settings September 16, 2026 16:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Adds verified Apple Silicon Debug build instructions for brpc using CMake, including dynamic Homebrew/SDK path discovery and optional compilation database generation.

Changes:

  • Document Apple Silicon Debug CMake configure/build commands (EN + CN), including SDK and Homebrew prefix setup.
  • Add optional CMAKE_EXPORT_COMPILE_COMMANDS guidance and troubleshoot tapi error: malformed file via Xcode selection.
  • Ignore build-debug/ output directory in .gitignore.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.

File Description
docs/en/getting_started.md Adds Apple Silicon Debug CMake build instructions, compile DB option, and SDK/Xcode troubleshooting.
docs/cn/getting_started.md Chinese counterpart of the new Apple Silicon Debug CMake instructions and troubleshooting.
.gitignore Ignores the newly documented build-debug/ directory.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/en/getting_started.md Outdated
Comment thread docs/en/getting_started.md Outdated
Comment thread docs/cn/getting_started.md Outdated
Comment thread docs/cn/getting_started.md Outdated
Comment thread docs/en/getting_started.md Outdated
Comment thread docs/en/getting_started.md Outdated
Update instructions for using CMake to compile Debug version of brpc on Apple Silicon.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants