diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-03-03 16:39:31 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-03-03 16:39:31 +0100 |
commit | 62a7c386ee793124cdb283c3c3ae686e1662ddb2 (patch) | |
tree | aa27a06a8545d45d83f578e4629705346eb79610 /etc/defaults | |
parent | 9632ae784284293032bd34bbedbdbe9126cfa2bb (diff) | |
download | justbuild-62a7c386ee793124cdb283c3c3ae686e1662ddb2.tar.gz |
Externals: Set `-O2` and C standard `gnu17`
Diffstat (limited to 'etc/defaults')
-rw-r--r-- | etc/defaults/CC/TARGETS | 3 | ||||
-rw-r--r-- | etc/defaults/CC/TARGETS.absl | 1 | ||||
-rw-r--r-- | etc/defaults/CC/TARGETS.boringssl | 109 | ||||
-rw-r--r-- | etc/defaults/CC/TARGETS.git2 | 93 | ||||
-rw-r--r-- | etc/defaults/CC/TARGETS.nowerror | 3 | ||||
-rw-r--r-- | etc/defaults/CC/TARGETS.protobuf | 3 | ||||
-rw-r--r-- | etc/defaults/CC/TARGETS.re2 | 1 |
7 files changed, 114 insertions, 99 deletions
diff --git a/etc/defaults/CC/TARGETS b/etc/defaults/CC/TARGETS index d9f206c4..2cb6ab4b 100644 --- a/etc/defaults/CC/TARGETS +++ b/etc/defaults/CC/TARGETS @@ -2,9 +2,10 @@ { "type": ["CC", "defaults"] , "CC": ["clang"] , "CXX": ["clang++"] - , "CFLAGS": [] + , "CFLAGS": ["-std=gnu17", "-O2"] , "CXXFLAGS": [ "-std=c++20" + , "-O2" , "-Wall" , "-Wextra" , "-Wpedantic" diff --git a/etc/defaults/CC/TARGETS.absl b/etc/defaults/CC/TARGETS.absl index c5ecd903..15df20d1 100644 --- a/etc/defaults/CC/TARGETS.absl +++ b/etc/defaults/CC/TARGETS.absl @@ -5,6 +5,7 @@ , "CFLAGS": [] , "CXXFLAGS": [ "-std=c++20" + , "-O2" , "-Wall" , "-Wextra" , "-Weverything" diff --git a/etc/defaults/CC/TARGETS.boringssl b/etc/defaults/CC/TARGETS.boringssl index c570b5d2..563e5b1f 100644 --- a/etc/defaults/CC/TARGETS.boringssl +++ b/etc/defaults/CC/TARGETS.boringssl @@ -4,64 +4,69 @@ , "CC": ["clang"] , "CXX": ["clang++"] , "CFLAGS": - { "type": "let*" - , "bindings": - [ [ "PLATFORM" - , { "type": "join" - , "separator": "_" - , "$1": - [ {"type": "var", "name": "OS"} - , { "type": "var" - , "name": "TARGET_ARCH" - , "default": {"type": "var", "name": "ARCH"} + { "type": "++" + , "$1": + [ ["-std=gnu17", "-O2"] + , { "type": "let*" + , "bindings": + [ [ "PLATFORM" + , { "type": "join" + , "separator": "_" + , "$1": + [ {"type": "var", "name": "OS"} + , { "type": "var" + , "name": "TARGET_ARCH" + , "default": {"type": "var", "name": "ARCH"} + } + ] } ] - } - ] - , [ "posix_copts" - , [ "-Wa,--noexecstack" - , "-D_XOPEN_SOURCE=700" - , "-Wall" - , "-Werror" - , "-Wformat=2" - , "-Wsign-compare" - , "-Wmissing-field-initializers" - , "-Wwrite-strings" - , "-Wshadow" - , "-fno-common" + , [ "posix_copts" + , [ "-Wa,--noexecstack" + , "-D_XOPEN_SOURCE=700" + , "-Wall" + , "-Werror" + , "-Wformat=2" + , "-Wsign-compare" + , "-Wmissing-field-initializers" + , "-Wwrite-strings" + , "-Wshadow" + , "-fno-common" + ] + ] ] - ] - ] - , "body": - { "type": "cond" - , "cond": - [ [ { "type": "or" - , "$1": - [ { "type": "==" - , "$1": {"type": "var", "name": "PLATFORM"} - , "$2": "linux_ppc64le" - } - , { "type": "==" - , "$1": {"type": "var", "name": "PLATFORM"} - , "$2": "linux_x86_64" - } - , { "type": "==" - , "$1": {"type": "var", "name": "PLATFORM"} - , "$2": "mac_x86_64" + , "body": + { "type": "cond" + , "cond": + [ [ { "type": "or" + , "$1": + [ { "type": "==" + , "$1": {"type": "var", "name": "PLATFORM"} + , "$2": "linux_ppc64le" + } + , { "type": "==" + , "$1": {"type": "var", "name": "PLATFORM"} + , "$2": "linux_x86_64" + } + , { "type": "==" + , "$1": {"type": "var", "name": "PLATFORM"} + , "$2": "mac_x86_64" + } + ] } + , {"type": "var", "name": "posix_copts"} ] - } - , {"type": "var", "name": "posix_copts"} - ] - , [ { "type": "==" - , "$1": {"type": "var", "name": "PLATFORM"} - , "$2": "windows_x86_64" + , [ { "type": "==" + , "$1": {"type": "var", "name": "PLATFORM"} + , "$2": "windows_x86_64" + } + , ["-DWIN32_LEAN_AND_MEAN", "-DOPENSSL_NO_ASM"] + ] + ] + , "default": ["-DOPENSSL_NO_ASM"] } - , ["-DWIN32_LEAN_AND_MEAN", "-DOPENSSL_NO_ASM"] - ] - ] - , "default": ["-DOPENSSL_NO_ASM"] - } + } + ] } , "CXXFLAGS": [] , "AR": ["ar"] diff --git a/etc/defaults/CC/TARGETS.git2 b/etc/defaults/CC/TARGETS.git2 index 2efd5574..158d93e4 100644 --- a/etc/defaults/CC/TARGETS.git2 +++ b/etc/defaults/CC/TARGETS.git2 @@ -4,52 +4,57 @@ , "CC": ["clang"] , "CXX": ["clang++"] , "CFLAGS": - { "type": "case" - , "expr": {"type": "var", "name": "OS"} - , "case": - { "windows": - [ "-D_SCL_SECURE_NO_WARNINGS" - , "-D_CRT_SECURE_NO_DEPRECATE" - , "-D_CRT_NONSTDC_NO_DEPRECATE" - , "/GF" - , "/MP" - , "/nologo" - ] - } - , "default": - { "type": "++" - , "$1": - [ ["-D_GNU_SOURCE", "-Wall", "-Wextra"] - , { "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": "++" + , "$1": + [ ["-std=gnu17", "-O2"] + , { "type": "case" + , "expr": {"type": "var", "name": "OS"} + , "case": + { "windows": + [ "-D_SCL_SECURE_NO_WARNINGS" + , "-D_CRT_SECURE_NO_DEPRECATE" + , "-D_CRT_NONSTDC_NO_DEPRECATE" + , "/GF" + , "/MP" + , "/nologo" + ] + } + , "default": + { "type": "++" + , "$1": + [ ["-D_GNU_SOURCE", "-Wall", "-Wextra"] + , { "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" + ] + } + } + , [ "-Wdocumentation" + , "-Wno-documentation-deprecated-sync" + , "-Wno-missing-field-initializers" + , "-Wstrict-aliasing" + , "-Wstrict-prototypes" + , "-Wdeclaration-after-statement" + , "-Wshift-count-overflow" + , "-Wunused-const-variable" + , "-Wunused-function" + , "-Wint-conversion" + , "-Wformat" + , "-Wformat-security" ] - } + ] } - , [ "-Wdocumentation" - , "-Wno-documentation-deprecated-sync" - , "-Wno-missing-field-initializers" - , "-Wstrict-aliasing" - , "-Wstrict-prototypes" - , "-Wdeclaration-after-statement" - , "-Wshift-count-overflow" - , "-Wunused-const-variable" - , "-Wunused-function" - , "-Wint-conversion" - , "-Wformat" - , "-Wformat-security" - ] - ] - } + } + ] } , "CXXFLAGS": [] , "AR": ["ar"] diff --git a/etc/defaults/CC/TARGETS.nowerror b/etc/defaults/CC/TARGETS.nowerror index ecc58daf..ca414ab7 100644 --- a/etc/defaults/CC/TARGETS.nowerror +++ b/etc/defaults/CC/TARGETS.nowerror @@ -2,9 +2,10 @@ { "type": ["CC", "defaults"] , "CC": ["clang"] , "CXX": ["clang++"] - , "CFLAGS": [] + , "CFLAGS": ["-std=gnu17", "-O2"] , "CXXFLAGS": [ "-std=c++20" + , "-O2" ] , "AR": ["ar"] , "PATH": ["/bin", "/sbin", "/usr/bin", "/usr/sbin"] diff --git a/etc/defaults/CC/TARGETS.protobuf b/etc/defaults/CC/TARGETS.protobuf index b808ea51..4bf6c5d8 100644 --- a/etc/defaults/CC/TARGETS.protobuf +++ b/etc/defaults/CC/TARGETS.protobuf @@ -2,9 +2,10 @@ { "type": ["CC", "defaults"] , "CC": ["clang"] , "CXX": ["clang++"] - , "CFLAGS": [] + , "CFLAGS": ["-std=gnu17", "-O2"] , "CXXFLAGS": [ "-std=c++20" + , "-O2" , "-DHAVE_PTHREAD" , "-DHAVE_ZLIB" , "-Woverloaded-virtual" diff --git a/etc/defaults/CC/TARGETS.re2 b/etc/defaults/CC/TARGETS.re2 index aecce9e9..2128f459 100644 --- a/etc/defaults/CC/TARGETS.re2 +++ b/etc/defaults/CC/TARGETS.re2 @@ -5,6 +5,7 @@ , "CFLAGS": [] , "CXXFLAGS": [ "-std=c++11" + , "-O2" , "-pthread" , "-Wall" , "-Wextra" |