#
# For a description of the syntax of this configuration file,
# see docs/misc/kconfig-language.txt
#
mainmenu "Xen/$(SRCARCH) $(XEN_FULLVERSION) Configuration"

source "scripts/Kconfig.include"

config BROKEN
	bool

config CC_IS_GCC
	def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)

config GCC_VERSION
	int
	default $(shell,$(srctree)/scripts/gcc-version.sh $(CC))

config CC_IS_CLANG
	def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)

config CLANG_VERSION
	int
	default $(shell,$(srctree)/scripts/clang-version.sh $(CC))

config LD_IS_GNU
	def_bool $(success,$(LD) --version | head -n 1 | grep -q "^GNU ld")

config LD_IS_LLVM
	def_bool $(success,$(LD) --version | head -n 1 | grep -q "^LLD")

# -fvisibility=hidden reduces -fpic cost, if it's available
config CC_HAS_VISIBILITY_ATTRIBUTE
	def_bool $(cc-option,-fvisibility=hidden)

# Use -f{function,data}-sections compiler parameters
config CC_SPLIT_SECTIONS
	bool

# Set code alignment.
#
# Allow setting on a boolean basis, and then convert such selection to an
# integer for the build system and code to consume more easily.
config FUNCTION_ALIGNMENT_4B
	bool
config FUNCTION_ALIGNMENT_8B
	bool
config FUNCTION_ALIGNMENT_16B
	bool
config FUNCTION_ALIGNMENT
	int
	default 16 if FUNCTION_ALIGNMENT_16B
	default  8 if  FUNCTION_ALIGNMENT_8B
	default  4 if  FUNCTION_ALIGNMENT_4B
	default  0

source "arch/$(SRCARCH)/Kconfig"

config DEFCONFIG_LIST
	string
	option defconfig_list
	default ARCH_DEFCONFIG

config EXPERT
	bool "Configure EXPERT features"
	help
	  This option allows certain base Xen options and settings
	  to be disabled or tweaked. This is for specialized environments
	  which can tolerate a "non-standard" Xen.
	  Only use this if you really know what you are doing.
	  Xen binaries built with this option enabled are not security
	  supported.
	default n

config UNSUPPORTED
	bool "Configure UNSUPPORTED features"
	default EXPERT
	help
	  This option allows certain unsupported Xen options to be changed,
	  which includes non-security-supported, experimental, and tech
	  preview features as defined by SUPPORT.md. (Note that if an option
	  doesn't depend on UNSUPPORTED it doesn't imply that is supported.)

config LTO
	bool "Link Time Optimisation"
	depends on BROKEN
	help
	  Enable Link Time Optimisation.

	  If unsure, say N.

#
# For architectures that know their compiler __int128 support is sound
#
config ARCH_SUPPORTS_INT128
	bool

source "Kconfig.debug"
