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):