[SERVER-83702] investigate bazels built in cc_library flags Created: 29/Nov/23  Updated: 02/Feb/24

Status: Needs Scheduling
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Daniel Moody Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Build
Participants:

 Description   

While switching to bazel, we are using bazels built in cc_* rules to build things. These rules add many compilation flags which seem like they may be useful or harmful. We need to investigate each one and weigh the pros and cons. We should err on the side of caution and push any investigation that is not short and obvious to a future ticket. We should weigh with service arch on some flags we choose to keep as they can affect C++ features and behaviors. Note these flags were generated with clang. when selecting gcc, bazel uses cc1plus binary with much less flags. The full list to investigate is below:
-triple aarch64-mongodb-linux
-emit-obj
-mrelax-all
--mrelax-relocations
-disable-free
-disable-llvm-verifier
-discard-value-names
-mrelocation-model pic
-pic-level 2
-fhalf-no-semantic-interposition
-mframe-pointer=non-leaf
-fmath-errno
-fno-rounding-math
-mconstructor-aliases
-munwind-tables
-target-cpu generic
-target-feature +neon
-target-abi aapcs
-fallow-half-arguments-and-returns
-fno-split-dwarf-inlining
-debugger-tuning=gdb
-sys-header-deps
-Wno-builtin-macro-redefined
-fdeprecated-macro
-ferror-limit 19
-fno-signed-char
-fgnuc-version=4.2.1
-fno-implicit-modules
-fcxx-exceptions
-fexceptions
-faddrsig



 Comments   
Comment by Daniel Moody [ 29/Nov/23 ]

This might be a candidate for phase 2.

Generated at Thu Feb 08 06:52:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.