From 119521bd83412c522f49d939163fbbbfe4d21379 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 25 Jun 2015 13:04:07 -0100 Subject: [PATCH] [infer][java] do not pass -Werror to javac Summary: @public We do not want Infer to die because javac emits a warning. Closes https://github.com/facebook/infer/issues/18. Written together with irp. Test Plan: This used to fail but now works: git clone https://github.com/igniterealtime/Smack.git cd Smack infer -- gradle build --- infer/bin/inferlib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infer/bin/inferlib.py b/infer/bin/inferlib.py index 0c6464a68..9f9ecb9e5 100644 --- a/infer/bin/inferlib.py +++ b/infer/bin/inferlib.py @@ -151,7 +151,10 @@ def get_javac_args(args): return None else: # replace any -g:.* flag with -g to preserve debugging symbols - return map(lambda arg: '-g' if '-g:' in arg else arg, javac_args) + args = map(lambda arg: '-g' if '-g:' in arg else arg, javac_args) + # skip -Werror + args = filter(lambda arg: arg != '-Werror', args) + return args def remove_infer_out(infer_out):