Commit 918d5021 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

configure: Fix parsing of ARM triples

To support proper parsing of arm64 targets, we needed to adjust
the GHC_LLVM_TARGET function to allow parsing arm64-apple-darwin
into aarch64. This however discared the proper os detection.

To rectify this, we'll pull the os detection into separate block.

Fixes #19173.
parent ce706fae
Pipeline #33966 canceled with stages
in 36 seconds
......@@ -2089,14 +2089,6 @@ AC_DEFUN([GHC_LLVM_TARGET], [
llvm_target_vendor="unknown"
llvm_target_os="windows"
;;
# retain any android and gnueabi linux flavours
# for the LLVM Target. Otherwise these would be
# turned into just `-linux` and fail to be found
# in the `llvm-targets` file.
*-android*|*-gnueabi*|*-musleabi*)
GHC_CONVERT_VENDOR([$3],[llvm_target_vendor])
llvm_target_os="$4"
;;
# apple is a bit about their naming scheme for
# aarch64; and clang on macOS doesn't know that
# aarch64 would be arm64. So for LLVM we'll need
......@@ -2112,6 +2104,16 @@ AC_DEFUN([GHC_LLVM_TARGET], [
GHC_CONVERT_OS([$4],[$2],[llvm_target_os])
;;
esac
case "$4" in
# retain any android and gnueabi linux flavours
# for the LLVM Target. Otherwise these would be
# turned into just `-linux` and fail to be found
# in the `llvm-targets` file.
*-android*|*-gnueabi*|*-musleabi*)
GHC_CONVERT_VENDOR([$3],[llvm_target_vendor])
llvm_target_os="$4"
;;
esac
$5="$llvm_target_cpu-$llvm_target_vendor-$llvm_target_os"
])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment