def METHOD_NAME(position, done_flags, platform):
    """
    This function asynchronously builds the specified platform while updating
    the progress with a progress bar.
    The thread then waits to close until all the platforms before it have
    finished building.
    :param position: The vertical position of the progress bar.
    :type position: int
    :param done_flags: Shared memory flags to track finished builds.
    :type done_flags: shared_memory.ShareableList
    :param platform: Platform name for this thread to build.
    :type platform: str
    """
    text = '{platform}'.format(platform=platform)
    text = text.ljust(10)
    # Run west build and always create a pristine build.
    cmd = 'west build -d build/'
    cmd += platform
    cmd += ' -c -p -b ast1030_evb meta-facebook/'
    cmd += platform
    # Start the build process first.
    p = Popen(cmd, stdout=PIPE, stderr=STDOUT, shell=True)
    # The build progress bar won't start until the first compilation step
    # because we don't know how many steps exist before that point.
    #
    # Create a spinner so user know it's not stuck.
    spinner = itertools.cycle(['-', '/', '|', '\\'])
    last_update = round(time.time() * 1000)
    # Create progress bars with percent completion/
    with tqdm(total=100, position=position, desc=text) as progress:
        # Look for output that start with [step / total_steps].
        status_regex = re.compile(r'^\[(.*)\/(.*)\]')
        for line in p.stdout:
            # Only update progress on on matching output.
            status = status_regex.match(line.decode("utf-8"))
            if status is not None and len(status.groups()) == 2:
                # Reset description on first actual step.
                if progress.n == 0:
                    progress.set_description_str(text)
                # Get current percent.
                percent = ((int(status.group(1)) / int(status.group(2))) * 100)
                # Update with the difference between current and prev.
                progress.update(int(percent) - progress.n)
            # Animate spinner before first step.
            elif progress.n == 0:
                curr_time = round(time.time() * 1000)
                # Update spinner.
                if curr_time - last_update > 100:
                    init_string = text + " starting "
                    init_string += next(spinner)
                    progress.set_description_str(init_string)
                    last_update = curr_time
        # Sometimes the stdout will be empty before the process is actually
        # done. Wait to make sure we can get the return code.
        p.wait()
        if p.returncode == 0:
            progress.colour = 'GREEN'
        else:
            progress.colour = 'RED'
        wait_for_others(progress, position, done_flags)