mirror of https://github.com/google/oss-fuzz.git
Relax project language requirement. (#3846)
This is necessary for the bisector to be able to build older revisions. Print a warning instead.
This commit is contained in:
parent
703b92adea
commit
e8ef609568
|
@ -297,7 +297,7 @@ def _get_project_language(project_name):
|
||||||
if match:
|
if match:
|
||||||
return match.group(1)
|
return match.group(1)
|
||||||
|
|
||||||
raise Exception('language attribute not found in project.yaml.')
|
return None
|
||||||
|
|
||||||
|
|
||||||
def _add_architecture_args(parser, choices=('x86_64', 'i386')):
|
def _add_architecture_args(parser, choices=('x86_64', 'i386')):
|
||||||
|
@ -465,7 +465,7 @@ def build_image(args):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
def build_fuzzers_impl( # pylint: disable=too-many-arguments,too-many-locals
|
def build_fuzzers_impl( # pylint: disable=too-many-arguments,too-many-locals,too-many-branches
|
||||||
project_name,
|
project_name,
|
||||||
clean,
|
clean,
|
||||||
engine,
|
engine,
|
||||||
|
@ -482,6 +482,8 @@ def build_fuzzers_impl( # pylint: disable=too-many-arguments,too-many-locals
|
||||||
project_out_dir = _get_output_dir(project_name)
|
project_out_dir = _get_output_dir(project_name)
|
||||||
project_work_dir = _get_work_dir(project_name)
|
project_work_dir = _get_work_dir(project_name)
|
||||||
project_language = _get_project_language(project_name)
|
project_language = _get_project_language(project_name)
|
||||||
|
if not project_language:
|
||||||
|
print('WARNING: language not specified in project.yaml. Build may fail.')
|
||||||
|
|
||||||
if clean:
|
if clean:
|
||||||
print('Cleaning existing build artifacts.')
|
print('Cleaning existing build artifacts.')
|
||||||
|
@ -503,10 +505,13 @@ def build_fuzzers_impl( # pylint: disable=too-many-arguments,too-many-locals
|
||||||
print('Keeping existing build artifacts as-is (if any).')
|
print('Keeping existing build artifacts as-is (if any).')
|
||||||
env = [
|
env = [
|
||||||
'FUZZING_ENGINE=' + engine,
|
'FUZZING_ENGINE=' + engine,
|
||||||
'FUZZING_LANGUAGE=' + project_language,
|
|
||||||
'SANITIZER=' + sanitizer,
|
'SANITIZER=' + sanitizer,
|
||||||
'ARCHITECTURE=' + architecture,
|
'ARCHITECTURE=' + architecture,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if project_language:
|
||||||
|
env.append('FUZZING_LANGUAGE=' + project_language)
|
||||||
|
|
||||||
if env_to_add:
|
if env_to_add:
|
||||||
env += env_to_add
|
env += env_to_add
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue