|
|
|
@ -34,13 +34,20 @@ class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler): |
|
|
|
|
language = 'java' |
|
|
|
|
id = 'unknown' |
|
|
|
|
|
|
|
|
|
_WARNING_LEVELS: T.Dict[str, T.List[str]] = { |
|
|
|
|
'0': ['-nowarn'], |
|
|
|
|
'1': ['-Xlint:all'], |
|
|
|
|
'2': ['-Xlint:all', '-Xdoclint:all'], |
|
|
|
|
'3': ['-Xlint:all', '-Xdoclint:all'], |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice, |
|
|
|
|
info: 'MachineInfo', full_version: T.Optional[str] = None): |
|
|
|
|
super().__init__(exelist, version, for_machine, info, full_version=full_version) |
|
|
|
|
self.javarunner = 'java' |
|
|
|
|
|
|
|
|
|
def get_warn_args(self, level: str) -> T.List[str]: |
|
|
|
|
return ['-Xlint:all', '-Xdoclint:all'] |
|
|
|
|
return self._WARNING_LEVELS[level] |
|
|
|
|
|
|
|
|
|
def get_werror_args(self) -> T.List[str]: |
|
|
|
|
return ['-Werror'] |
|
|
|
@ -65,9 +72,6 @@ class JavaCompiler(BasicLinkerIsCompilerMixin, Compiler): |
|
|
|
|
def get_buildtype_args(self, buildtype: str) -> T.List[str]: |
|
|
|
|
return java_buildtype_args[buildtype] |
|
|
|
|
|
|
|
|
|
def get_depfile_suffix(self) -> str: |
|
|
|
|
return 'd' |
|
|
|
|
|
|
|
|
|
def compute_parameters_with_absolute_paths(self, parameter_list: T.List[str], |
|
|
|
|
build_dir: str) -> T.List[str]: |
|
|
|
|
for idx, i in enumerate(parameter_list): |
|
|
|
|