# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"

BBFILE_COLLECTIONS += "clang-layer"
BBFILE_PATTERN_clang-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_clang-layer = "7"
LAYERSERIES_COMPAT_clang-layer = "kirkstone"
LAYERDEPENDS_clang-layer = "core"

BBFILES_DYNAMIC += " \
    browser-layer:${LAYERDIR}/dynamic-layers/browser-layer/*/*.bb \
    browser-layer:${LAYERDIR}/dynamic-layers/browser-layer/*/*.bbappend \
    openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \
    openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \
    networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \
    networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \
    selinux:${LAYERDIR}/dynamic-layers/selinux/*/*.bb \
"

PREFERRED_PROVIDER_libgcc-initial = "libgcc-initial"
#PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs_forcevariable = "libcxx"
PREFERRED_PROVIDER_llvm = "clang"
PREFERRED_PROVIDER_llvm-native = "clang-native"
PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
PREFERRED_PROVIDER_libunwind = "${@bb.utils.contains_any("RUNTIME", "llvm android", "libcxx", "libunwind", d)}"
INHERIT += "clang"

# Do not include clang in SDK unless user wants to
CLANGSDK ??= "0"

LLVMVERSION = "14.0.6"

require conf/nonclangable.conf
require conf/nonscanable.conf
