blob: 4fa05a14152319724013b3ef9d9ac628c421c178 [file] [log] [blame]
# Set goarch/goos based on what we see in the LLVM triple.
string(REGEX REPLACE "-" " " lht_components ${LLVM_DEFAULT_TARGET_TRIPLE})
separate_arguments(lht_components)
list(GET lht_components 0 goarch)
list(GET lht_components 2 goos)
# LLVM's "x86_64" is the same as Go's "amd64".
if( ${goarch} STREQUAL "x86_64" )
set(goarch "amd64")
endif()
# List of all architectures, families, os flavors.
set(allgoarch "386" "alpha" "amd64" "amd64p32" "arm" "armbe" "arm64" "arm64be" "ia64" "m68k" "mips" "mipsle" "mips64" "mips64le" "mips64p32" "mips64p32le" "ppc" "ppc64" "ppc64le" "s390" "s390x" "sparc" "sparc64")
set(allgoarchfamily "I386" "ALPHA" "AMD64" "ARM" "ARM64" "IA64" "M68K" "MIPS" "MIPS64" "PPC" "PPC64" "S390" "S390X" "SPARC" "SPARC64")
set(allgoos "aix" "android" "darwin" "dragonfly" "freebsd" "irix" "linux" "netbsd" "openbsd" "plan9" "rtems" "solaris" "windows")
# FIXME: write code to insure that this is set and that the shell
# in question behaves properly.
set(shell $ENV{SHELL})
# FIXME: write cmake to discover awk, test to make sure it works
set(awk "/usr/bin/awk")