def METHOD_NAME(arguments):
    build_path = normalize_builddir(
        settings.FLANG_DIR, arguments.builddir, arguments.clean)
    build_options = generate_buildoptions(arguments)
    install_root = Path(arguments.install_prefix)
    executable_suffix = '.exe' if sys.platform == 'win32' else ""
    flang = install_root / 'bin' / f'flang{executable_suffix}'
    additional_options = [
        f'-DCMAKE_Fortran_COMPILER={flang.as_posix()}',
        '-DCMAKE_Fortran_COMPILER_ID=Flang',
        '-DFLANG_INCLUDE_DOCS=ON',
        '-DFLANG_LLVM_EXTENSIONS=ON',
        f'-DLLVM_TARGETS_TO_BUILD={arguments.target}',
        '-DWITH_WERROR=ON'
    ]
    build_options.extend(additional_options)
    cmake_cmd = ['cmake', '-B', build_path, '-S', settings.FLANG_DIR.as_posix()]
    cmake_cmd.extend(build_options)
    subprocess.run(cmake_cmd, check=True)
    return build_path