<commit_before>set(CFI_TESTSUITES)

macro (add_cfi_test_suites lld thinlto)
  set(suffix)
  if (${lld})
    set(suffix ${suffix}-lld)
  endif()
  if (${thinlto})
    set(suffix ${suffix}-thinlto)
  endif()
  set(suffix ${suffix}-${CFI_TEST_TARGET_ARCH})

  set(CFI_TEST_USE_LLD ${lld})
  set(CFI_TEST_USE_THINLTO ${thinlto})

  set(CFI_LIT_TEST_MODE Standalone)
  set(CFI_TEST_CONFIG_SUFFIX -standalone${suffix})
  configure_lit_site_cfg(
    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
    ${CMAKE_CURRENT_BINARY_DIR}/Standalone${suffix}/lit.site.cfg
    )
  list(APPEND CFI_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Standalone${suffix})

  set(CFI_LIT_TEST_MODE Devirt)
  set(CFI_TEST_CONFIG_SUFFIX -devirt${suffix})
  configure_lit_site_cfg(
    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
    ${CMAKE_CURRENT_BINARY_DIR}/Devirt${suffix}/lit.site.cfg
    )
  list(APPEND CFI_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Devirt${suffix})
endmacro()

set(CFI_TEST_ARCH ${CFI_SUPPORTED_ARCH})
if(APPLE)
  darwin_filter_host_archs(CFI_SUPPORTED_ARCH CFI_TEST_ARCH)
endif()

foreach(arch ${CFI_TEST_ARCH})
  set(CFI_TEST_TARGET_ARCH ${arch})
  get_test_cc_for_arch(${arch} CFI_TEST_TARGET_CC CFI_TEST_TARGET_CFLAGS)
  if (APPLE)
    # FIXME: enable ThinLTO tests after fixing http://llvm.org/pr32741
    add_cfi_test_suites(False False)
  elseif(WIN32)
    add_cfi_test_suites(True False)
    add_cfi_test_suites(True True)
  else()
    add_cfi_test_suites(False False)
    add_cfi_test_suites(False True)
    if (COMPILER_RT_HAS_LLD)
      add_cfi_test_suites(True False)
      add_cfi_test_suites(True True)
    endif()
  endif()
endforeach()
<commit_msg>[cfi] Disable tests with lld on i386.<commit_after>set(CFI_TESTSUITES)

macro (add_cfi_test_suites lld thinlto)
  set(suffix)
  if (${lld})
    set(suffix ${suffix}-lld)
  endif()
  if (${thinlto})
    set(suffix ${suffix}-thinlto)
  endif()
  set(suffix ${suffix}-${CFI_TEST_TARGET_ARCH})

  set(CFI_TEST_USE_LLD ${lld})
  set(CFI_TEST_USE_THINLTO ${thinlto})

  set(CFI_LIT_TEST_MODE Standalone)
  set(CFI_TEST_CONFIG_SUFFIX -standalone${suffix})
  configure_lit_site_cfg(
    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
    ${CMAKE_CURRENT_BINARY_DIR}/Standalone${suffix}/lit.site.cfg
    )
  list(APPEND CFI_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Standalone${suffix})

  set(CFI_LIT_TEST_MODE Devirt)
  set(CFI_TEST_CONFIG_SUFFIX -devirt${suffix})
  configure_lit_site_cfg(
    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
    ${CMAKE_CURRENT_BINARY_DIR}/Devirt${suffix}/lit.site.cfg
    )
  list(APPEND CFI_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Devirt${suffix})
endmacro()

set(CFI_TEST_ARCH ${CFI_SUPPORTED_ARCH})
if(APPLE)
  darwin_filter_host_archs(CFI_SUPPORTED_ARCH CFI_TEST_ARCH)
endif()

foreach(arch ${CFI_TEST_ARCH})
  set(CFI_TEST_TARGET_ARCH ${arch})
  get_test_cc_for_arch(${arch} CFI_TEST_TARGET_CC CFI_TEST_TARGET_CFLAGS)
  if (APPLE)
    # FIXME: enable ThinLTO tests after fixing http://llvm.org/pr32741
    add_cfi_test_suites(False False)
  elseif(WIN32)
    add_cfi_test_suites(True False)
    add_cfi_test_suites(True True)
  else()
    add_cfi_test_suites(False False)
    add_cfi_test_suites(False True)
    if (COMPILER_RT_HAS_LLD AND NOT arch STREQUAL "i386")
      add_cfi_test_suites(True False)
      add_cfi_test_suites(True True)
    endif()
  endif()
endforeach()

{'fraction_non_alphanumeric': 0.11449925261584454, 'fraction_numerical': 0.005979073243647235, 'mean_word_length': 5.6786427145708585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '626978', 'n_tokens_mistral': 1453, 'n_tokens_neox': 1384, 'n_words': 183}