[SERVER-81090] Create custom bazel build rules for each target type (ex. "mongo_cc_library") to allow adding mongo-specific settings Created: 14/Sep/23 Updated: 29/Oct/23 Resolved: 19/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Zack Winter | Assignee: | Zack Winter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
Bazel doesn’t provide any way to propagate certain build rule variables across many targets automatically. The current issue is, if we want to set `copts= “-Isrc”` for all targets under the /src/ directory, we would have to set it in every single target manually. Since we likely are going to need to add other custom settings beyond copts, create a custom build target for each target type (lib, cc, etc) that every other build rule can depend on where we can add custom mongo settings, like copts. See https://docs.google.com/document/d/1e2A1M8yjSTwxOtEB9As1XwfjSuUlmiXVSQFfl3b_FaU/edit |
| Comments |
| Comment by Githook User [ 19/Sep/23 ] |
|
Author: {'name': 'Zack Winter', 'email': 'zack.winter@mongodb.com', 'username': 'zackwintermdb'}Message: |