[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
master
Jules Villard 10 years ago
parent 751288e5eb
commit 119521bd83

@ -151,7 +151,10 @@ def get_javac_args(args):
return None return None
else: else:
# replace any -g:.* flag with -g to preserve debugging symbols # 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): def remove_infer_out(infer_out):

Loading…
Cancel
Save