diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-25 02:11:34 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-25 02:11:34 (GMT) |
commit | 711d12bb586b23d5bdea4f57fe0101255324cc78 (patch) | |
tree | d7a72c80f662482628a6cbbc90b2767531d93167 /config/clang-flags | |
parent | 67cfa2396ce633d01138069f6c0081bbadb1e4a3 (diff) | |
download | hdf5-711d12bb586b23d5bdea4f57fe0101255324cc78.zip hdf5-711d12bb586b23d5bdea4f57fe0101255324cc78.tar.gz hdf5-711d12bb586b23d5bdea4f57fe0101255324cc78.tar.bz2 |
Brings the 'warnings-as-errors' changes from develop
Diffstat (limited to 'config/clang-flags')
-rw-r--r-- | config/clang-flags | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/config/clang-flags b/config/clang-flags index 5a6d9c2..92a8973 100644 --- a/config/clang-flags +++ b/config/clang-flags @@ -163,9 +163,16 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then ################ HIGH_OPT_CFLAGS="-O3" - DEBUG_OPT_CFLAGS="-g" NO_OPT_CFLAGS="-O0" + # -Og is only understood by clang 4+ and Xcode 9+ + # Otherwise use -O1 (which is what -Og usually equates to) + if test "X-clang" = "X-$cc_vendor" -a $cc_vers_major -ge 4 -o "X-Apple LLVM" = "X-$cc_vendor" -a $cc_vers_major -ge 9; then + DEBUG_OPT_CFLAGS="-Og" + else + DEBUG_OPT_CFLAGS="-O1" + fi + ############ # Warnings # ############ @@ -176,6 +183,7 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)" H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)" + H5_NECFLAGS="$H5_NECFLAGS $(load_clang_arguments noerror-general)" ###################### # Developer warnings # |