Open schulze opened 6 years ago
@schulze -Wno-unknown-pragmas sufficed for me to get it to work with clang!
@prashantbarca -Wno-unknown-pragmas
does not suffice on this system:
clang -o build/opt/src/backends/regex.os -c -std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes -Wno-unused-variable -Wno-unknown-pragmas -O3 -fPIC
build/opt/src/backends/regex.c
build/opt/src/backends/regex.c:229:32: error: unknown warning group '-Wclobbered', ignored
[-Werror,-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wclobbered"
^
1 error generated.
Mac OS X is not my native habitat, so it might well be that I am missing something here. Xcode should be up to date.
As the error message say, the problem here is not a unknown pragma, but the unknown warning that is introduced by the pragma.
This fixes the build to respect CC=gcc on darwin and to ignore a warning that breaks the build with xcodes's clang on my system.