Work around e2fsck issue for building sparse GSIs

When trying to support sparse format for GSIs, aosp/720949, a bug in
e2fsck was triggered, and hence failed the build for sparse GSI.

This workaround disables the detection of ASAN ODR so we can build
sparse GSIs successfully like we previously did for the vendors,
some of which can't handle unsparse images.

Bug: 112062612
Test: $ lunch aosp_x86_64-eng
      $ m SANITIZE_HOST=address ASAN_OPTIONS=detect_odr_violation=0 -j
      $ emulator

Change-Id: Ifafd27aa1e57d785b914f78a4d9bfef6a0c33fc9
This commit is contained in:
Isaac Chen
2018-08-02 14:02:56 +08:00
parent 7b4b1b1548
commit ec7fa1cd09

View File

@@ -714,7 +714,9 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None):
# Run e2fsck on the inflated image file
e2fsck_command = ["e2fsck", "-f", "-n", unsparse_image]
(e2fsck_output, exit_code) = RunCommand(e2fsck_command)
# TODO(b/112062612): work around e2fsck failure with SANITIZE_HOST=address
env4e2fsck = {"ASAN_OPTIONS": "detect_odr_violation=0"}
(e2fsck_output, exit_code) = RunCommand(e2fsck_command, env=env4e2fsck)
os.remove(unsparse_image)