Skip to content

Commit 3115c62

Browse files
Matt Jorasmeta-codesync[bot]
authored andcommitted
Add platform-specific MVCHECK/MVDCHECK macros for binary size reduction
Summary: Add platform-specific CHECK macros that preserve debug messages on server while completely eliminating message strings on mobile builds. Implementation uses variadic macros with Buck select(): - Server (MvfstCheck.h): Maps to glog CHECK/DCHECK with __VA_OPT__ for optional message support. Messages are preserved in binary and logged on failure. - Mobile (MvfstCheck-mobile.h): Uses std::abort() and completely ignores variadic message arguments at the preprocessor level, guaranteeing no message strings in the binary. MVDCHECK is eliminated entirely. Changes: - Add MvfstCheck.h (server) and MvfstCheck-mobile.h (mobile) with BUCK select() to swap headers based on platform - Replace CHECK/CHECK_EQ/etc with MVCHECK variants throughout quic/ - Replace DCHECK/DCHECK_EQ/etc with MVDCHECK variants throughout quic/ - Pass debug messages as variadic macro arguments instead of streaming Reviewed By: jbeshay Differential Revision: D89497050 fbshipit-source-id: 0d03d48f835138dde39543a20fc41cae28bdc92f
1 parent af280ba commit 3115c62

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build/fbcode_builder/CMake/FBCompilerSettingsMSVC.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88

99
add_compile_options(
1010
/wd4250 # 'class1' : inherits 'class2::member' via dominance
11+
/Zc:preprocessor # Enable conforming preprocessor for __VA_OPT__ support
1112
)

0 commit comments

Comments
 (0)