diff --git a/setup/build.py b/setup/build.py index 1e25574b32..6d00bb9fb3 100644 --- a/setup/build.py +++ b/setup/build.py @@ -173,6 +173,8 @@ def init_env(): if islinux: cflags.append('-pthread') + if sys.stdout.isatty(): + cflags.append('-fdiagnostics-color=always') ldflags.append('-shared') if isbsd: