Skip to content

Conversation

@jwillemsen
Copy link
Member

@jwillemsen jwillemsen commented Aug 8, 2025

…default for all configurations

* docs/templates/bmake.txt:
* templates/bmake.mpd:
* templates/bmakedll.mpt:
* templates/bmakedllexe.mpt:
* templates/bmakelib.mpt:
* templates/bmakelibexe.mpt:

Summary by CodeRabbit

  • New Features

    • Introduced a new configuration option to control the generation of Program Database (PDB) files in build templates.
    • Added documentation describing the new option for relevant project types.
  • Chores

    • Updated all build configurations to enable the new PDB generation option by default.

…default for all configurations

    * docs/templates/bmake.txt:
    * templates/bmake.mpd:
    * templates/bmakedll.mpt:
    * templates/bmakedllexe.mpt:
    * templates/bmakelib.mpt:
    * templates/bmakelibexe.mpt:
@coderabbitai
Copy link

coderabbitai bot commented Aug 8, 2025

Walkthrough

A new boolean template variable pdbl was introduced to control the inclusion of Program Database (PDB) linker flags in various build configurations for the bmake project type. Documentation and multiple template files were updated to set pdbl = 1 for all relevant build configurations, and the conditional logic for linker flags was modified to use this variable.

Changes

Cohort / File(s) Change Summary
Documentation Update
docs/templates/bmake.txt
Added documentation for the new pdbl template variable, describing its effect on linker debugging settings.
Linker Flags Logic
templates/bmake.mpd
Changed conditional assignment of LFLAGS to depend on pdbl instead of debug project status.
DLL Build Configurations
templates/bmakedll.mpt
Added pdbl = 1 to all build configuration blocks (Release, Debug, Static Release, Static Debug).
DLL Executable Build Configurations
templates/bmakedllexe.mpt
Added pdbl = 1 to all build configuration blocks (Release, Debug, Static Release, Static Debug).
Library Build Configurations
templates/bmakelib.mpt
Added pdbl = 1 to both Release and Debug build configuration blocks.
Library Executable Build Configurations
templates/bmakelibexe.mpt
Added pdbl = 1 to both Release and Debug build configuration blocks.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TemplateEngine
    participant BuildConfig

    User->>TemplateEngine: Selects bmake project type
    TemplateEngine->>BuildConfig: Reads build configuration
    BuildConfig->>TemplateEngine: Returns config with pdbl flag
    TemplateEngine->>TemplateEngine: Sets LFLAGS based on pdbl
    TemplateEngine->>User: Generates build files with correct linker flags
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Poem

In the meadow where builds are made,
A flag named pdbl hops into the glade.
Now every config, both debug and release,
Gets PDB magic, bringing much peace.
With linker flags set, the code hops along—
A rabbit’s small tweak, making builds strong! 🐇✨

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee18005 and 700de10.

📒 Files selected for processing (1)
  • templates/bmake.mpd (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • templates/bmake.mpd
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: macos-14-C++17
  • GitHub Check: macos-13-C++17
  • GitHub Check: ubuntu-24.04 g++-10
  • GitHub Check: VS2022Debug64
  • GitHub Check: VS2022Release32
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: ubuntu-22.04 g++-12
  • GitHub Check: windows-2022 vs2022
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
templates/bmakedllexe.mpt (1)

13-13: Reduce duplication: consider defaulting pdbl in a common include

To avoid repeating pdbl = 1 in many template variants, consider setting a default in bmakecommon (or the central bmake.mpd) and overriding only where needed. Keeps future changes centralized.

Also applies to: 22-22, 32-32, 43-43

docs/templates/bmake.txt (1)

25-25: Clarify scope and fix minor spacing in pdbl doc entry

Tighten phrasing and note applicability. Suggested edit:

-pdbl =  If this boolean template variable is set, the Linker Debugging property "Generate Program Database File" will be set according to the project target.
+pdbl = If set, enables link-time generation of Program Database (PDB) files for applicable targets (executables and DLLs). Typically applies to the bcc64x toolchain and is ignored for static library targets.
templates/bmake.mpd (1)

55-55: Optional: maintain backward-compatibility when pdbl is undefined

To avoid surprising behavior for custom/legacy MPC projects that haven’t introduced pdbl yet (previously debug builds produced PDBs), consider falling back to debug_prj when pdbl is not set.

Proposed change:

-LFLAGS =<%if(pdbl)%> $(PDB_FLAGS)<%endif%>
+LFLAGS =<%if(pdbl)%> $(PDB_FLAGS)<%else%><%if(debug_prj)%> $(PDB_FLAGS)<%endif%><%endif%>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b061a4b and 2411500.

📒 Files selected for processing (6)
  • docs/templates/bmake.txt (1 hunks)
  • templates/bmake.mpd (1 hunks)
  • templates/bmakedll.mpt (4 hunks)
  • templates/bmakedllexe.mpt (4 hunks)
  • templates/bmakelib.mpt (2 hunks)
  • templates/bmakelibexe.mpt (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: jwillemsen
PR: DOCGroup/MPC#232
File: templates/bmake.mpd:329-338
Timestamp: 2025-08-06T12:53:40.049Z
Learning: The Embarcadero BCC64X compiler supports parallel compilation using the `{$? }` syntax in makefile pattern rules to compile all out-of-date dependencies in a single compiler invocation. This is a unique feature documented at https://docwiki.embarcadero.com/RADStudio/Athens/en/BCC64X#Parallel_Compilation and should not be flagged as incorrect when used with bcc64x.
Learnt from: jwillemsen
PR: DOCGroup/MPC#232
File: templates/bmake.mpd:329-338
Timestamp: 2025-08-06T12:53:40.049Z
Learning: The Embarcadero BCC64X compiler supports batch compilation where multiple out-of-date source files can be compiled in a single invocation using `{$? }` syntax in makefile pattern rules. This is a documented feature that combines batch compilation with parallel processing via the --jobs flag to maximize build performance. The syntax `-output-dir $(D) -c {$? }` is the correct and recommended approach for BCC64X parallel compilation.
📚 Learning: 2025-08-06T12:53:40.049Z
Learnt from: jwillemsen
PR: DOCGroup/MPC#232
File: templates/bmake.mpd:329-338
Timestamp: 2025-08-06T12:53:40.049Z
Learning: The Embarcadero BCC64X compiler supports parallel compilation using the `{$? }` syntax in makefile pattern rules to compile all out-of-date dependencies in a single compiler invocation. This is a unique feature documented at https://docwiki.embarcadero.com/RADStudio/Athens/en/BCC64X#Parallel_Compilation and should not be flagged as incorrect when used with bcc64x.

Applied to files:

  • docs/templates/bmake.txt
  • templates/bmake.mpd
📚 Learning: 2025-08-06T12:53:40.049Z
Learnt from: jwillemsen
PR: DOCGroup/MPC#232
File: templates/bmake.mpd:329-338
Timestamp: 2025-08-06T12:53:40.049Z
Learning: The Embarcadero BCC64X compiler supports batch compilation where multiple out-of-date source files can be compiled in a single invocation using `{$? }` syntax in makefile pattern rules. This is a documented feature that combines batch compilation with parallel processing via the --jobs flag to maximize build performance. The syntax `-output-dir $(D) -c {$? }` is the correct and recommended approach for BCC64X parallel compilation.

Applied to files:

  • templates/bmake.mpd
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: windows-2022 vs2022
  • GitHub Check: ubuntu-24.04 g++-10
  • GitHub Check: VS2022Release32
  • GitHub Check: VS2022Debug64
  • GitHub Check: macos-13-C++17
  • GitHub Check: macos-14-C++17
🔇 Additional comments (8)
templates/bmakedllexe.mpt (2)

13-13: PDB generation enabled across all configs: LGTM

Setting pdbl = 1 in all configurations aligns with the PR goal and the updated docs. Good default for bcc64x users.

Also applies to: 22-22, 32-32, 43-43


31-33: pdbl exclusively affects linker flags, not librarian steps

Verified in templates/bmake.mpd (line 55) that pdbl only gates LFLAGS = $(PDB_FLAGS) and does not appear in any libflags or static‐library librarian settings. No changes needed.

templates/bmakelibexe.mpt (1)

12-12: Consistent pdbl enablement for lib+exe template: LGTM

Matches the strategy used in other bmake templates and the documented behavior.

Also applies to: 22-22

templates/bmakedll.mpt (1)

12-12: Uniform pdbl enablement across DLL configs: LGTM

Consistent with the new linker-flag gating by pdbl. No issues spotted in these blocks.

Also applies to: 21-21, 31-31, 43-43

templates/bmakelib.mpt (1)

9-9: Static library template sets pdbl: verify no unintended linker usage

For pure static libraries, PDBs are produced at the consumer link step, not by the librarian. Double-check that pdbl does not alter libflags/tlib invocations for this template.

You can reuse the script from the bmakedllexe.mpt comment to confirm pdbl is only consulted when constructing LFLAGS for EXE/DLL targets.

Also applies to: 18-18

docs/templates/bmake.txt (1)

25-25: Alphabetical placement looks correct: LGTM

The new entry is correctly positioned between obj_ext and rc.

templates/bmake.mpd (2)

55-55: Decouple PDB generation via pdbl: LGTM

Switching LFLAGS to be gated by pdbl instead of debug_prj cleanly separates “generate PDB” from “debug build.” Matches the PR objective.


55-55: pdbl is properly defined and documented

  • pdbl = 1 is present in all intended templates:
    templates/bmakedll.mpt, bmakedllexe.mpt, bmakelib.mpt, bmakelibexe.mpt
  • Documentation in docs/templates/bmake.txt includes a description of pdbl

No further changes required.

@jwillemsen jwillemsen merged commit 6d96a69 into DOCGroup:master Aug 8, 2025
12 checks passed
@jwillemsen jwillemsen deleted the jwi-bcc64xpdbl branch August 8, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant