From 22733532171330136d87533d523f565f2a4f102f Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Wed, 6 Sep 2017 11:31:01 -0400 Subject: Clean up opt and llc The LLVM backend shells out to LLVMs `opt` and `llc` tools. This clean up introduces a shared data structure to carry the arguments we pass to each tool so that corresponding flags are next to each other. It drops the hard coded data layouts in favor of using `-mtriple` and have LLVM infer them. Furthermore we add `clang` as a proper tool, so we don't rely on assuming that `clang` is called `clang` on the `PATH` when using `clang` as the assembler. Finally this diff also changes the type of `optLevel` from `Int` to `Word`, as we do not have negative optimization levels. Reviewers: erikd, hvr, austin, rwbarton, bgamari, kavon Reviewed By: kavon Subscribers: michalt, Ericson2314, ryantrinkle, dfeuer, carter, simonpj, kavon, simonmar, thomie, erikd, snowleopard Differential Revision: https://phabricator.haskell.org/D3352 --- testsuite/mk/ghc-config.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'testsuite/mk') diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs index cf550082db..b0278bcfae 100644 --- a/testsuite/mk/ghc-config.hs +++ b/testsuite/mk/ghc-config.hs @@ -27,6 +27,7 @@ main = do getGhcFieldOrDefault fields "GhcDynamic" "GHC Dynamic" "NO" getGhcFieldOrDefault fields "GhcProfiled" "GHC Profiled" "NO" getGhcFieldProgWithDefault fields "AR" "ar command" "ar" + getGhcFieldProgWithDefault fields "CLANG" "LLVM clang command" "clang" getGhcFieldProgWithDefault fields "LLC" "LLVM llc command" "llc" getGhcFieldProgWithDefault fields "TEST_CC" "C compiler command" "gcc" -- cgit v1.2.1