-
Notifications
You must be signed in to change notification settings - Fork 63
Add support for parallel compilation for the Embarcadero bcc64x compiler #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Makes it possible to configure the number of jobs from the user
WalkthroughThe changes introduce conditional support for parallel compilation by adding new variables and logic to handle parallel flags and processor count. Directory creation for build outputs is made explicit via dependencies and rules. Silent command prefixes are removed from directory creation steps, and compilation rules are updated to accommodate parallel builds, especially for Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Make as Makefile
participant Compiler as Compiler
Dev->>Make: Invoke build target
Make->>Make: Check if $(INTERMEDIATE), $(OUTPUTDIR) exist
alt Directories missing
Make->>Make: Create missing directories
end
Make->>Compiler: For each .cpp file, check for PARALLEL_CFLAGS
alt PARALLEL_CFLAGS defined
Make->>Compiler: Compile with parallel flags & output dir
else
Make->>Compiler: Compile with standard flags
end
Make->>Make: Link objects/resources to produce output
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
templates/bmake.mpd(7 hunks)templates/bmakecommon.mpt(1 hunks)
⏰ 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: VS2022Release32
- GitHub Check: VS2022Debug64
- GitHub Check: windows-2022 vs2022
- GitHub Check: ubuntu-22.04 g++-12
- GitHub Check: macos-14-C++17
- GitHub Check: macos-13-C++17
- GitHub Check: ubuntu-24.04 g++-10
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (3)
templates/bmakecommon.mpt (1)
143-143: LGTM! Parallel compilation flag appropriately added for bcc64x.The
--jobsflag with processor count is correctly configured for the clang15-based bcc64x compiler.templates/bmake.mpd (2)
226-226: Good improvement: Explicit directory dependencies added to build targets.Adding
$(INTERMEDIATE)and$(OUTPUTDIR)as dependencies ensures directories are created before building, preventing potential build failures.Also applies to: 240-240, 255-255
102-104: Verify--jobs=0behavior in bcc64x
We’ve defaultedMPC_NUMBER_OF_PROCESSORSto 0, which generates--jobs=0in the compiler flags. Local searches didn’t reveal how Borland’sbcc64xtreats a zero value (no parallelism, unlimited threads, or an error). Please confirm the intended semantics and, if necessary, adjust the default (for example, use 1 for sequential builds) or add logic to detect the actual CPU count.Affected locations:
• templates/bmake.mpd lines 102–104!ifndef MPC_NUMBER_OF_PROCESSORS MPC_NUMBER_OF_PROCESSORS = 0 !endif• templates/bmakecommon.mpt line 143
parallel_flags = --jobs=$(MPC_NUMBER_OF_PROCESSORS)
Summary by CodeRabbit
New Features
Improvements