Commit e80dfb2
Document build type options
Summary:
**Pre-submission checklist**
- [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install`
- [x] `pre-commit run`
Document the `--build-type` option for the run-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-type` flag
- **docs/static/code_snips/*.sh**: Updated all build script examples to use `--build-type` instead of passing `CMAKE_BUILD_TYPE` in `--extra-cmake-defines`
- Updated the `--build-type` help text in run-getdeps.py to include:
- Concise descriptions of each build type
- Indication that RelWithDebInfo is the default
- Removed the outdated "widely supported" comment
- Created a shared `BUILD_TYPE_ARG` kwargs dictionary to define the `--build-type` argument once
- Replaced 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 MinSizeRel` vs JSON in `--extra-cmake-defines`
- Single 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 --help`
- `test --help`
- `generate-github-actions --help`
X-link: facebook/fboss#842
Reviewed By: joseph5wu
Differential Revision: D93010077
Pulled By: KevinYakar
fbshipit-source-id: d1a0b780c28e8f8fa5ca716326fbcadb244ade871 parent e403663 commit e80dfb2
2 files changed
+12
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| |||
881 | 890 | | |
882 | 891 | | |
883 | 892 | | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
| 893 | + | |
891 | 894 | | |
892 | 895 | | |
893 | 896 | | |
| |||
969 | 972 | | |
970 | 973 | | |
971 | 974 | | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
| 975 | + | |
979 | 976 | | |
980 | 977 | | |
981 | 978 | | |
| |||
1450 | 1447 | | |
1451 | 1448 | | |
1452 | 1449 | | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
| 1450 | + | |
1460 | 1451 | | |
1461 | 1452 | | |
1462 | 1453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
| |||
0 commit comments