Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec7fa1cd authored by Isaac Chen's avatar Isaac Chen
Browse files

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
parent 7b4b1b15
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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)