Skip to content
Snippets Groups Projects
Commit 9ca011cd authored by Sven Tennie's avatar Sven Tennie :smiley_cat:
Browse files

Host target needs to be LLVM adjusted

Same as for target target: LLVM does not support all triples.
parent 65dcae13
No related tags found
No related merge requests found
......@@ -4,10 +4,14 @@
# Sets the arguments of the LLVM assembler ($LLVMAS; usually clang.)
AC_DEFUN([FP_PROG_LLVM_AS_ARGS],
[
AC_REQUIRE([GHC_LLVM_TARGET_SET_VAR])
AC_REQUIRE([GHC_LLVM_HOST_TARGET_SET_VAR])
# Cross-compiling: We need to define the target triple for the LLVM assembler.
# Though, it does not hurt to define it for the non-cross case as well.
LlvmAsArgsTarget="--target=$TargetPlatform"
LlvmAsArgsHost="--target=$HostPlatform"
# Otherwise, LLVMAS tries to build for the host architecture. Defining the host
# target is not strictly necessary, but it usually helps to be specific about
# the build options.
LlvmAsArgsTarget="--target=$LlvmTarget"
LlvmAsArgsHost="--target=$LlvmHostTarget"
# Create a minimal LLVM IR file for testing
cat > test.ll <<EOF
......
......@@ -57,3 +57,13 @@ AC_DEFUN([GHC_LLVM_TARGET_SET_VAR], [
GHC_LLVM_TARGET([$target],[$target_cpu],[$target_vendor],[$target_os],[LlvmTarget])
fi
])
# GHC_LLVM_HOST_TARGET_SET_VAR
# -----------------------
#
# Sets the cannonical target variable of the host. This stub exists so other
# macros can require it.
AC_DEFUN([GHC_LLVM_HOST_TARGET_SET_VAR], [
AC_REQUIRE([FPTOOLS_SET_PLATFORMS_VARS])
GHC_LLVM_TARGET([$host],[$host_cpu],[$host_vendor],[$host_os],[LlvmHostTarget])
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment