diff mbox series

[edk2,v2,2/3] BaseTools/tools_def CLANG38: add -Wno-unused-const-variable

Message ID 20171207092851.2118-3-ard.biesheuvel@linaro.org
State Superseded
Headers show
Series BaseTools/tools_def: GCC5/CLANG38 toolchain updates | expand

Commit Message

Ard Biesheuvel Dec. 7, 2017, 9:28 a.m. UTC
Commit 8b6366f87584 ("BaseTools/GCC: set -Wno-unused-const-variable
on RELEASE builds") suppresses warnings about unused constant
variables in RELEASE builds when building with GCC, given that they
break the build under our warnings-as-errors policy.

Do the same for CLANG38.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=790
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
v2: new patch

 BaseTools/Conf/tools_def.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Laszlo Ersek Dec. 7, 2017, 11:33 a.m. UTC | #1
On 12/07/17 10:28, Ard Biesheuvel wrote:
> Commit 8b6366f87584 ("BaseTools/GCC: set -Wno-unused-const-variable

> on RELEASE builds") suppresses warnings about unused constant

> variables in RELEASE builds when building with GCC, given that they

> break the build under our warnings-as-errors policy.

> 

> Do the same for CLANG38.

> 

> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=790

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

> v2: new patch

> 

>  BaseTools/Conf/tools_def.template | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template

> index c0189d4c8d30..703884fc49a7 100755

> --- a/BaseTools/Conf/tools_def.template

> +++ b/BaseTools/Conf/tools_def.template

> @@ -5664,7 +5664,7 @@ DEFINE CLANG38_X64_PREFIX           = ENV(CLANG38_BIN)

>  DEFINE CLANG38_IA32_TARGET          = -target i686-pc-linux-gnu

>  DEFINE CLANG38_X64_TARGET           = -target x86_64-pc-linux-gnu

>  

> -DEFINE CLANG38_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body  -Wno-varargs

> +DEFINE CLANG38_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs

>  DEFINE CLANG38_ALL_CC_FLAGS         = DEF(GCC44_ALL_CC_FLAGS) DEF(CLANG38_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float  -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-unknown-warning-option

>  

>  ###########################

> 


Very kind of you.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Shi, Steven Dec. 8, 2017, 1:44 a.m. UTC | #2
Thank you!

Reviewed-by: Shi Steven <steven.shi@intel.com>



Steven Shi
Intel\SSG\STO\UEFI Firmware

Tel: +86 021-61166522
iNet: 821-6522

> -----Original Message-----

> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

> Sent: Thursday, December 7, 2017 5:29 PM

> To: edk2-devel@lists.01.org

> Cc: leif.lindholm@linaro.org; Gao, Liming <liming.gao@intel.com>; Zhu,

> Yonghong <yonghong.zhu@intel.com>; Shi, Steven <steven.shi@intel.com>;

> evan.lloyd@arm.com; lersek@redhat.com; Ard Biesheuvel

> <ard.biesheuvel@linaro.org>

> Subject: [PATCH v2 2/3] BaseTools/tools_def CLANG38: add -Wno-unused-

> const-variable

> 

> Commit 8b6366f87584 ("BaseTools/GCC: set -Wno-unused-const-variable

> on RELEASE builds") suppresses warnings about unused constant

> variables in RELEASE builds when building with GCC, given that they

> break the build under our warnings-as-errors policy.

> 

> Do the same for CLANG38.

> 

> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=790

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

> v2: new patch

> 

>  BaseTools/Conf/tools_def.template | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/BaseTools/Conf/tools_def.template

> b/BaseTools/Conf/tools_def.template

> index c0189d4c8d30..703884fc49a7 100755

> --- a/BaseTools/Conf/tools_def.template

> +++ b/BaseTools/Conf/tools_def.template

> @@ -5664,7 +5664,7 @@ DEFINE CLANG38_X64_PREFIX           =

> ENV(CLANG38_BIN)

>  DEFINE CLANG38_IA32_TARGET          = -target i686-pc-linux-gnu

>  DEFINE CLANG38_X64_TARGET           = -target x86_64-pc-linux-gnu

> 

> -DEFINE CLANG38_WARNING_OVERRIDES    = -Wno-parentheses-equality -

> Wno-tautological-compare -Wno-tautological-constant-out-of-range-

> compare -Wno-empty-body  -Wno-varargs

> +DEFINE CLANG38_WARNING_OVERRIDES    = -Wno-parentheses-equality -

> Wno-tautological-compare -Wno-tautological-constant-out-of-range-

> compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs

>  DEFINE CLANG38_ALL_CC_FLAGS         = DEF(GCC44_ALL_CC_FLAGS)

> DEF(CLANG38_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -

> Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-

> incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-

> sse -mno-mmx -msoft-float -mno-implicit-float  -ftrap-

> function=undefined_behavior_has_been_optimized_away_by_clang -

> funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-unknown-

> warning-option

> 

>  ###########################

> --

> 2.11.0


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index c0189d4c8d30..703884fc49a7 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -5664,7 +5664,7 @@  DEFINE CLANG38_X64_PREFIX           = ENV(CLANG38_BIN)
 DEFINE CLANG38_IA32_TARGET          = -target i686-pc-linux-gnu
 DEFINE CLANG38_X64_TARGET           = -target x86_64-pc-linux-gnu
 
-DEFINE CLANG38_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body  -Wno-varargs
+DEFINE CLANG38_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs
 DEFINE CLANG38_ALL_CC_FLAGS         = DEF(GCC44_ALL_CC_FLAGS) DEF(CLANG38_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float  -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-unknown-warning-option
 
 ###########################