[Git][ghc/ghc][wip/supersven/add-LLVMAS-target] Debug
Sven Tennie (@supersven)
gitlab at gitlab.haskell.org
Sat Sep 21 14:36:39 UTC 2024
Sven Tennie pushed to branch wip/supersven/add-LLVMAS-target at Glasgow Haskell Compiler / GHC
Commits:
fb82db15 by Sven Tennie at 2024-09-21T16:36:25+02:00
Debug
- - - - -
3 changed files:
- configure.ac
- m4/fp_cc_supports_target.m4
- m4/fp_prog_llvm_as_args.m4
Changes:
=====================================
configure.ac
=====================================
@@ -545,9 +545,6 @@ FIND_LLVM_PROG([LLVMAS], [clang], [$LlvmMinVersion], [$LlvmMaxVersion])
LlvmAsCmd="$LLVMAS"
AC_SUBST([LlvmAsCmd])
-dnl ** Which LLVM assembler arguments to use (e.g. `--target=...`)?
-FP_PROG_LLVM_AS_ARGS()
-
dnl --------------------------------------------------------------
dnl End of configure script option section
dnl --------------------------------------------------------------
@@ -655,6 +652,9 @@ FP_CC_SUPPORTS_TARGET([$CC_STAGE0], [CONF_CC_OPTS_STAGE0], [CONF_CXX_OPTS_STAGE0
FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE1], [CONF_CXX_OPTS_STAGE1])
FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE2], [CONF_CXX_OPTS_STAGE2])
+dnl ** Which LLVM assembler arguments to use (e.g. `--target=...`)?
+FP_PROG_LLVM_AS_ARGS()
+
FP_PROG_CC_LINKER_TARGET([$CC_STAGE0], [CONF_CC_OPTS_STAGE0], [CONF_GCC_LINKER_OPTS_STAGE0])
FP_PROG_CC_LINKER_TARGET([$CC], [CONF_CC_OPTS_STAGE1], [CONF_GCC_LINKER_OPTS_STAGE1])
FP_PROG_CC_LINKER_TARGET([$CC], [CONF_CC_OPTS_STAGE2], [CONF_GCC_LINKER_OPTS_STAGE2])
=====================================
m4/fp_cc_supports_target.m4
=====================================
@@ -13,7 +13,7 @@
AC_DEFUN([FP_CC_SUPPORTS_TARGET],
[
AC_REQUIRE([GHC_LLVM_TARGET_SET_VAR])
- AC_MSG_CHECKING([whether $1 supports --target])
+ AC_MSG_CHECKING([whether $1 supports --target $LlvmTarget])
echo 'int main() { return 0; }' > conftest.c
if test "$target_cpu" = "javascript" ; then
@@ -32,6 +32,8 @@ AC_DEFUN([FP_CC_SUPPORTS_TARGET],
if test $CONF_CC_SUPPORTS_TARGET = YES ; then
$2="--target=$LlvmTarget $$2"
$3="--target=$LlvmTarget $$3"
+ AC_MSG_NOTICE([Result 2: $2])
+ AC_MSG_NOTICE([Result 3: $3])
fi
])
=====================================
m4/fp_prog_llvm_as_args.m4
=====================================
@@ -40,6 +40,9 @@ else
# to build intermediate GHC stages (with host target). This ressembles old
# behaviour and is added for backwards compatibility.
LlvmAsArgsHost=""
+
+ # TODO: Delete this debug output
+ $LLVMAS -v $LlvmAsArgsHost test.ll
fi
AC_MSG_CHECKING([whether \$LLVMAS supports target flags passed by GHC when compiling])
@@ -48,6 +51,9 @@ if $LLVMAS $LlvmAsArgsTarget test.ll > /dev/null 2>&1 ; then
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([\$LLVMAS ($LLVMAS) does not support target flags: $LlvmAsArgsTarget])
+
+ # TODO: Delete this debug output
+ $LLVMAS -v $LlvmAsArgsTarget test.ll
fi
AC_SUBST(LlvmAsArgsHost)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fb82db15cd872ee993974b332a7bab2dd64d44f2
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fb82db15cd872ee993974b332a7bab2dd64d44f2
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240921/8b56c90b/attachment-0001.html>
More information about the ghc-commits
mailing list