summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2017-09-06 11:31:01 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-06 11:33:07 -0400
commit22733532171330136d87533d523f565f2a4f102f (patch)
treed399f168096fe203d459fb5fa0fc1210ff05bd4c /ghc.mk
parent0cd467b2269595e1ae2bc273c3acf9e14adeb9e7 (diff)
downloadhaskell-22733532171330136d87533d523f565f2a4f102f.tar.gz
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
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/ghc.mk b/ghc.mk
index 7f532df8ed..1e3720936f 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -1050,6 +1050,7 @@ $(eval $(call bindist-list,.,\
INSTALL \
configure config.sub config.guess install-sh \
settings.in \
+ llvm-targets \
packages \
Makefile \
mk/config.mk.in \
@@ -1076,7 +1077,7 @@ $(eval $(call bindist-list,.,\
$(wildcard compiler/stage2/doc) \
$(wildcard libraries/*/dist-install/doc/) \
$(wildcard libraries/*/*/dist-install/doc/) \
- $(filter-out settings,$(INSTALL_LIBS)) \
+ $(filter-out settings llvm-targets,$(INSTALL_LIBS)) \
$(RTS_INSTALL_LIBS) \
$(filter-out %/project.mk mk/config.mk %/mk/install.mk,$(MAKEFILE_LIST)) \
mk/project.mk \
@@ -1109,7 +1110,7 @@ BIN_DIST_MK = $(BIN_DIST_PREP_DIR)/bindist.mk
unix-binary-dist-prep:
$(call removeTrees,bindistprep/)
"$(MKDIRHIER)" $(BIN_DIST_PREP_DIR)
- set -e; for i in packages LICENSE compiler ghc iserv rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh settings.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
+ set -e; for i in packages LICENSE compiler ghc iserv rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh settings.in llvm-targets ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK)
echo "BUILD_SPHINX_HTML = $(BUILD_SPHINX_HTML)" >> $(BIN_DIST_MK)
echo "BUILD_SPHINX_PDF = $(BUILD_SPHINX_PDF)" >> $(BIN_DIST_MK)
@@ -1207,7 +1208,7 @@ SRC_DIST_GHC_DIRS = mk rules docs distrib bindisttest libffi includes \
SRC_DIST_GHC_FILES += \
configure.ac config.guess config.sub configure \
aclocal.m4 README.md ANNOUNCE HACKING.md INSTALL.md LICENSE Makefile \
- install-sh settings.in VERSION GIT_COMMIT_ID \
+ install-sh settings.in llvm-targets VERSION GIT_COMMIT_ID \
boot packages ghc.mk MAKEHELP.md
.PHONY: VERSION