aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/ci.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-11-03 13:41:11 +0200
committerLoïc Hoguin <[email protected]>2016-11-03 13:41:28 +0200
commit07bb14cd9ea191121795093803ec8598c2a85563 (patch)
tree29613f976bf84c32947335e1ec4c8ae993f19c3b /plugins/ci.mk
parent65a7ae1a0ce7c6e75f0af114140f8b71deea47c3 (diff)
downloaderlang.mk-07bb14cd9ea191121795093803ec8598c2a85563.tar.gz
erlang.mk-07bb14cd9ea191121795093803ec8598c2a85563.tar.bz2
erlang.mk-07bb14cd9ea191121795093803ec8598c2a85563.zip
Add experimental ErLLVM support in CI
The VM used to test LLVM built code is the --enable-native-libs one.
Diffstat (limited to 'plugins/ci.mk')
-rw-r--r--plugins/ci.mk25
1 files changed, 15 insertions, 10 deletions
diff --git a/plugins/ci.mk b/plugins/ci.mk
index fe181e5..0d397bd 100644
--- a/plugins/ci.mk
+++ b/plugins/ci.mk
@@ -5,13 +5,17 @@
CI_OTP ?=
CI_HIPE ?=
+CI_HIPE_LLVM ?=
ifeq ($(CI_VM),native)
ERLC_OPTS += +native
TEST_ERLC_OPTS += +native
+else ifeq ($(CI_VM),native-llvm)
+ERLC_OPTS += +native +'{hipe, [to_llvm]}'
+TEST_ERLC_OPTS += +native +'{hipe, [to_llvm]}'
endif
-ifeq ($(strip $(CI_OTP) $(CI_HIPE)),)
+ifeq ($(strip $(CI_OTP) $(CI_HIPE) $(CI_HIPE_LLVM)),)
ci::
else
@@ -30,7 +34,7 @@ OTP_GIT ?= https://github.com/erlang/otp
CI_INSTALL_DIR ?= $(HOME)/erlang
-ci:: $(addprefix ci-,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)))
+ci:: $(addprefix ci-,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)) $(addsuffix -native-llvm,$(CI_HIPE_LLVM)))
ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)))
@@ -40,18 +44,19 @@ ci_verbose_0 = @echo " CI " $(1);
ci_verbose = $(ci_verbose_$(V))
define ci_target
-ci-$(1): $(CI_INSTALL_DIR)/$(1)
+ci-$1: $(CI_INSTALL_DIR)/$2
$(verbose) $(MAKE) --no-print-directory clean;
$(ci_verbose) \
- PATH="$(CI_INSTALL_DIR)/$(1)/bin:$(PATH)" \
- CI_OTP_RELEASE="$(1)" \
- CT_OPTS="-label $(1)" \
- CI_VM="$(2)" \
+ PATH="$(CI_INSTALL_DIR)/$2/bin:$(PATH)" \
+ CI_OTP_RELEASE="$1" \
+ CT_OPTS="-label $1" \
+ CI_VM="$3" \
$(MAKE) ci-setup tests
endef
-$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),otp)))
-$(foreach otp,$(CI_HIPE),$(eval $(call ci_target,$(otp)-native,native)))
+$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),$(otp)otp)))
+$(foreach otp,$(CI_HIPE),$(eval $(call ci_target,$(otp)-native,$(otp)-native,native)))
+$(foreach otp,$(CI_HIPE_LLVM),$(eval $(call ci_target,$(otp)-native-llvm,$(otp)-native,native-llvm)))
define ci_otp_target
ifeq ($(wildcard $(CI_INSTALL_DIR)/$(1)),)
@@ -72,7 +77,7 @@ $(CI_INSTALL_DIR)/$1-native: $(KERL)
endif
endef
-$(foreach otp,$(CI_HIPE),$(eval $(call ci_hipe_target,$(otp))))
+$(foreach otp,$(sort $(CI_HIPE) $(CI_HIPE_LLVM)),$(eval $(call ci_hipe_target,$(otp))))
$(KERL):
$(verbose) mkdir -p $(ERLANG_MK_TMP)