[Nexthop] Document build type options #842
Open
+47
−38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
Document the
--build-typeoption for the getdeps.py build script and refactor the argument definition to eliminate code duplication.docs/docs/build/Building_FBOSS_on_containers.md: Added comprehensive documentation about build types (Debug, Release, RelWithDebInfo, MinSizeRel) with a table explaining each option
docs/docs/platform/Building_Platform_Services.md: Updated build commands to use
--build-typeflagdocs/static/code_snips/*.sh: Updated all build script examples to use
--build-typeinstead of passingCMAKE_BUILD_TYPEin--extra-cmake-definesUpdated the
--build-typehelp text in getdeps.py to include:Created a shared
BUILD_TYPE_ARGkwargs dictionary to define the--build-typeargument onceReplaced three duplicate argument definitions in BuildCmd, TestCmd, and GenerateGithubActionsCmd classes
Reduced code duplication and improved maintainability
Users now understand what each build type does
Cleaner syntax:
--build-type MinSizeRelvs JSON in--extra-cmake-definesSingle source of truth for the argument definition
Easier to maintain and update in the future
Verified that help output works correctly for all three commands:
build --helptest --helpgenerate-github-actions --helpTest Plan
Visually inspected a local serve of the documentation
