Skip to content

Make DISPLAY_LEVEL_DEFAULT configurable at compile time#4620

Open
jlee303 wants to merge 1 commit intofacebook:devfrom
jlee303:defineable_cflags
Open

Make DISPLAY_LEVEL_DEFAULT configurable at compile time#4620
jlee303 wants to merge 1 commit intofacebook:devfrom
jlee303:defineable_cflags

Conversation

@jlee303
Copy link

@jlee303 jlee303 commented Mar 10, 2026

Enables DISPLAY_LEVEL_DEFAULT to be configured at compile time by wrapping it in #ifndef guards and adding the ZSTD_ prefix to avoid namespace pollution. Allows for quieter output without need to pass in -q every invocation.

To verify change, compare difference in verbosity with make vs CPPFLAGS='-DZSTD_DISPLAY_LEVEL_DEFAULT=3' make

Thanks @tansy for suggestion! #4492

@meta-cla meta-cla bot added the CLA Signed label Mar 10, 2026

#define DISPLAY_LEVEL_DEFAULT 3
#ifndef ZSTD_DISPLAY_LEVEL_DEFAULT
#define ZSTD_DISPLAY_LEVEL_DEFAULT 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: indent:
in the zstd code base, within an #ifdef section, we typically write

# define ZSTD_DISPLAY_LEVEL_DEFAULT N

notice the space between # and define.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants