Skip to content

Commit d596ab8

Browse files
committed
fixes
1 parent de06373 commit d596ab8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

infra/build/functions/build_project.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ def get_indexer_build_steps(project_name,
539539
build = Build('none', 'address', 'x86_64')
540540
env = get_env(project.fuzzing_language, build, project.name)
541541
env.append('INDEXER_BUILD=1')
542+
env.append('CAPTURE_REPLAY_SCRIPT=1')
542543

543544
prefix = f'indexer_indexes/{project.name}/{timestamp}/'
544545
signed_policy_document = build_lib.get_signed_policy_document_upload_prefix(
@@ -550,7 +551,9 @@ def get_indexer_build_steps(project_name,
550551
'name': project.image,
551552
'args': [
552553
'bash', '-c',
553-
f'cd /src && cd {project.workdir} && mkdir -p {build.out} && /opt/indexer/index_build.py'
554+
f'cd /src && cd {project.workdir} && mkdir -p {build.out} && '
555+
'/opt/indexer/index_build.py && '
556+
'cp /usr/local/bin/replay_build.sh $$SRC/'
554557
],
555558
'env': env,
556559
}
@@ -568,6 +571,12 @@ def get_indexer_build_steps(project_name,
568571
# Change $OUT back to the default for replayability.
569572
'-c',
570573
'ENV OUT /out',
574+
'-c',
575+
'ENV REPLAY_ENABLED 1',
576+
# Add CFLAGS that enable debugging (this should match the
577+
# index_build.py CFLAGS)
578+
'-c',
579+
'ENV CFLAGS "$$CFLAGS -O0 -glldb"',
571580
'indexed-container',
572581
_indexer_built_image_name(project.name) + f':{timestamp}'
573582
],
@@ -604,7 +613,8 @@ def get_indexer_build_steps(project_name,
604613
f'https://{signed_policy_document.bucket}.storage.googleapis.com;'
605614
' done'
606615
],
607-
'entrypoint': 'bash'
616+
'entrypoint': 'bash',
617+
'allowFailure': True,
608618
},
609619
build_lib.upload_using_signed_policy_document('/workspace/srcmap.json',
610620
f'{prefix}srcmap.json',

0 commit comments

Comments
 (0)