From b2f22ba09f338a8a6b36ffc821d848cb545b6f22 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 18 Jun 2018 22:04:48 -0400 Subject: [PATCH] build: Actually disable non-useful Clang warnings. * The if-case was appending to gccBaseFlags after the rest of the file was done using it, so it was ineffective. Now we set it with the rest of the baseFlags. * We already pass no-integrated-as in configure, no need to do it in MainBuildRules. * B_USE_BUILTIN_ATOMIC_FUNCTIONS isn't used anymore, so get rid of it. --- build/jam/ArchitectureRules | 19 ++++++------------- build/jam/MainBuildRules | 4 ---- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index a028f8b928..87a4ae36cd 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -43,6 +43,12 @@ rule ArchitectureSetup architecture gccBaseFlags += -fno-builtin-fork -fno-builtin-vfork ; } + # disable some Clang warnings that are not very useful + if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 { + gccBaseFlags += -Wno-address-of-packed-member -Wno-unused-private-field + -Wno-cast-align -Wno-gnu-designator ; + } + local cpu = $(HAIKU_CPU_$(architecture)) ; if $(cpu) = arm { if $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 { @@ -106,15 +112,6 @@ rule ArchitectureSetup architecture HAIKU_C++FLAGS_$(architecture) += -Wno-deprecated ; } - switch $(cpu) { - case x86* : - # Enable use of the gcc built-in atomic functions instead of - # atomic_*(). The former are inlined and have thus less overhead. - # They are not available with gcc 2, but the header will take care - # of that. - HAIKU_DEFINES_$(architecture) += B_USE_BUILTIN_ATOMIC_FUNCTIONS ; - } - # warning flags HAIKU_WARNING_CCFLAGS_$(architecture) = -Wall -Wno-trigraphs -Wmissing-prototypes @@ -134,10 +131,6 @@ rule ArchitectureSetup architecture HAIKU_WERROR_FLAGS_$(architecture) += -Wno-unused-but-set-variable ; } - if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 { - gccBaseFlags += -Wno-address-of-packed-member -Wno-unused-private-field ; - } - # debug flags local debugFlags = -ggdb ; diff --git a/build/jam/MainBuildRules b/build/jam/MainBuildRules index 0f7305d99a..fbb70e08ce 100644 --- a/build/jam/MainBuildRules +++ b/build/jam/MainBuildRules @@ -353,10 +353,6 @@ rule CreateAsmStructOffsetsHeader header : source flags += -Wno-invalid-offsetof ; # TODO: Rather get rid of the respective offsetof() instances. - if $(HAIKU_CC_IS_CLANG_$(TARGET_PACKAGING_ARCH)) = 1 { - flags += -no-integrated-as ; - } - # locate object, search for source, and set on target variables Depends $(header) : $(source) $(PLATFORM) ;