aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-11-03 01:36:20 +0200
committerLoïc Hoguin <[email protected]>2016-11-03 01:36:46 +0200
commit65a7ae1a0ce7c6e75f0af114140f8b71deea47c3 (patch)
tree98ba321197dae1372cdfa7513e0cf913f369c355
parent4f5d8d7064faa1ee41eaf014127be15caf161ca8 (diff)
downloaderlang.mk-2016.11.03.tar.gz
erlang.mk-2016.11.03.tar.bz2
erlang.mk-2016.11.03.zip
Add experimental HiPE support in CI2016.11.03
-rw-r--r--plugins/ci.mk27
1 files changed, 23 insertions, 4 deletions
diff --git a/plugins/ci.mk b/plugins/ci.mk
index a06233d..fe181e5 100644
--- a/plugins/ci.mk
+++ b/plugins/ci.mk
@@ -4,8 +4,14 @@
.PHONY: ci ci-prepare ci-setup distclean-kerl
CI_OTP ?=
+CI_HIPE ?=
-ifeq ($(strip $(CI_OTP)),)
+ifeq ($(CI_VM),native)
+ERLC_OPTS += +native
+TEST_ERLC_OPTS += +native
+endif
+
+ifeq ($(strip $(CI_OTP) $(CI_HIPE)),)
ci::
else
@@ -24,9 +30,9 @@ OTP_GIT ?= https://github.com/erlang/otp
CI_INSTALL_DIR ?= $(HOME)/erlang
-ci:: $(addprefix ci-,$(CI_OTP))
+ci:: $(addprefix ci-,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)))
-ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP))
+ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP) $(addsuffix -native,$(CI_HIPE)))
ci-setup::
@@ -40,10 +46,12 @@ ci-$(1): $(CI_INSTALL_DIR)/$(1)
PATH="$(CI_INSTALL_DIR)/$(1)/bin:$(PATH)" \
CI_OTP_RELEASE="$(1)" \
CT_OPTS="-label $(1)" \
+ CI_VM="$(2)" \
$(MAKE) ci-setup tests
endef
-$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp))))
+$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp),otp)))
+$(foreach otp,$(CI_HIPE),$(eval $(call ci_target,$(otp)-native,native)))
define ci_otp_target
ifeq ($(wildcard $(CI_INSTALL_DIR)/$(1)),)
@@ -55,6 +63,17 @@ endef
$(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp))))
+define ci_hipe_target
+ifeq ($(wildcard $(CI_INSTALL_DIR)/$1-native),)
+$(CI_INSTALL_DIR)/$1-native: $(KERL)
+ KERL_CONFIGURE_OPTIONS=--enable-native-libs \
+ MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $1 $1-native
+ $(KERL) install $1-native $(CI_INSTALL_DIR)/$1-native
+endif
+endef
+
+$(foreach otp,$(CI_HIPE),$(eval $(call ci_hipe_target,$(otp))))
+
$(KERL):
$(verbose) mkdir -p $(ERLANG_MK_TMP)
$(gen_verbose) git clone --depth 1 $(KERL_GIT) $(ERLANG_MK_TMP)/kerl