{ "defaults": { "type": ["CC", "defaults"] , "arguments_config": ["TOOLCHAIN_CONFIG", "OS"] , "base": [["@", "base", "CC", "defaults"]] , "ADD_CFLAGS": { "type": "let*" , "bindings": [ [ "COMPILER_FAMILY" , { "type": "lookup" , "map": { "type": "var" , "name": "TOOLCHAIN_CONFIG" , "default": {"type": "empty_map"} } , "key": "FAMILY" , "default": "unknown" } ] , [ "OS" , { "type": "var" , "name": "OS" , "default": {"type": "fail", "msg": "Required variable 'OS' is not set."} } ] ] , "body": { "type": "case" , "expr": {"type": "var", "name": "COMPILER_FAMILY"} , "case": { "msvc": [ "-D_SCL_SECURE_NO_WARNINGS" , "-D_CRT_SECURE_NO_DEPRECATE" , "-D_CRT_NONSTDC_NO_DEPRECATE" , "/GF" , "/MP" , "/nologo" ] } , "default": { "type": "++" , "$1": [ [ "-std=gnu90" , "-D_GNU_SOURCE" , "-Wall" , "-Wextra" , "-DGIT_DEPRECATE_HARD" ] , { "type": "case" , "expr": {"type": "var", "name": "OS"} , "case": { "sunos": [ "-D_POSIX_C_SOURCE=200112L" , "-D__EXTENSIONS__" , "-D_POSIX_PTHREAD_SEMANTICS" ] , "solaris": [ "-D_POSIX_C_SOURCE=200112L" , "-D__EXTENSIONS__" , "-D_POSIX_PTHREAD_SEMANTICS" ] } } , { "type": "case" , "expr": {"type": "var", "name": "COMPILER_FAMILY"} , "case": { "clang": [ "-Wdocumentation" , "-Wno-documentation-deprecated-sync" , "-Wno-unused-but-set-variable" , "-Wno-unused-but-set-parameter" , "-Wno-single-bit-bitfield-constant-conversion" ] , "gnu": ["-Wno-dangling-pointer"] } } , [ "-Wno-missing-field-initializers" , "-Wstrict-aliasing" , "-Wstrict-prototypes" , "-Wdeclaration-after-statement" , "-Wshift-count-overflow" , "-Wunused-const-variable" , "-Wunused-function" , "-Wint-conversion" , "-Wformat" , "-Wformat-security" , "-Wmissing-declarations" , "-Wno-implicit-fallthrough" , "-Wno-sign-compare" , "-Wno-unused-parameter" , "-Wno-uninitialized" , "-Wno-array-parameter" , "-Wno-unknown-warning-option" ] ] } } } } }