summaryrefslogtreecommitdiff
path: root/compiler/ghc.mk
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2017-05-11 18:17:02 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2017-05-11 18:31:44 +0800
commit1345c7cc42c45e63ab1726a8fd24a7e4d4222467 (patch)
tree0738780f17b5415e4125b66e358fca046a11815a /compiler/ghc.mk
parent418bcf736cc8d861f338e09f278091ba3657644f (diff)
downloadhaskell-1345c7cc42c45e63ab1726a8fd24a7e4d4222467.tar.gz
Pass LLVMTarget (identical to --target)
Sometimes it might be of interest to have access to the raw target value when calling subcommands (e.g. llvm tools with --target), as such we forward the specified (or inferred) --target for later consumption. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3559
Diffstat (limited to 'compiler/ghc.mk')
-rw-r--r--compiler/ghc.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index d5498c4f58..2d2fedec4a 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -170,6 +170,7 @@ compiler/stage1/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/.
@echo "#define BUILD_ARCH \"$(BuildArch_CPP)\"" >> $@
@echo "#define HOST_ARCH \"$(HostArch_CPP)\"" >> $@
@echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@
+ @echo "#define LLVM_TARGET \"$(LLVMTarget_CPP)\"" >> $@
@echo >> $@
@echo "#define $(BuildOS_CPP)_BUILD_OS 1" >> $@
@echo "#define $(HostOS_CPP)_HOST_OS 1" >> $@
@@ -211,6 +212,7 @@ compiler/stage2/$(PLATFORM_H) : mk/config.mk mk/project.mk | $$(dir $$@)/.
@echo "#define BUILD_ARCH \"$(HostArch_CPP)\"" >> $@
@echo "#define HOST_ARCH \"$(TargetArch_CPP)\"" >> $@
@echo "#define TARGET_ARCH \"$(TargetArch_CPP)\"" >> $@
+ @echo "#define LLVM_TARGET \"$(LLVMTarget_CPP)\"" >> $@
@echo >> $@
@echo "#define $(HostOS_CPP)_BUILD_OS 1" >> $@
@echo "#define $(TargetOS_CPP)_HOST_OS 1" >> $@