From 24efb138a5fe75cf6374b925d168c50d1cf87978 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Fri, 11 Jul 2014 08:48:07 +1000 Subject: [PATCH 1/2] Revert "Fix make check for servo rustc version" This reverts commit 9191c7f3f178d20b09614138f3df0b9081a55ab7. --- src/test.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test.rs b/src/test.rs index 89d6d1d..446e7de 100644 --- a/src/test.rs +++ b/src/test.rs @@ -3,10 +3,9 @@ #[phase(syntax)] extern crate phf_mac; extern crate phf; -extern crate collections; mod map { - use collections::{HashMap, HashSet}; + use std::collections::{HashMap, HashSet}; use phf::PhfMap; #[allow(dead_code)] @@ -119,7 +118,7 @@ mod map { } mod set { - use collections::HashSet; + use std::collections::HashSet; use phf::PhfSet; #[allow(dead_code)] From 703657570cf21f05c1539987dff4ba527c266c3d Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Fri, 11 Jul 2014 08:50:13 +1000 Subject: [PATCH 2/2] Modify makefile to handle cross compiling for android --- Makefile.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 7137aab..5062d5e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,6 +3,7 @@ VPATH=%VPATH% RUSTC ?= rustc RUSTDOC ?= rustdoc RUSTFLAGS ?= -O +HOST_RUSTFLAGS ?= -O PHF_SRC := $(VPATH)/src/phf.rs PHF_MAC_SRC := $(VPATH)/src/phf_mac.rs @@ -10,14 +11,22 @@ PHF_TEST_SRC := $(VPATH)/src/test.rs all: $(MAKE) phf.dummy + $(MAKE) phf_host.dummy $(MAKE) phf_mac.dummy phf.dummy: $(PHF_SRC) $(RUSTC) $(RUSTFLAGS) $< --out-dir . touch $@ +# phf_mac depends on phf, so it must be built once for +# the target platform, and again for the host platform. +phf_host.dummy: $(PHF_SRC) + mkdir -p host + $(RUSTC) $(HOST_RUSTFLAGS) $< --out-dir host + touch $@ + phf_mac.dummy: $(PHF_MAC_SRC) - $(RUSTC) $(RUSTFLAGS) -L . $< --out-dir . + $(RUSTC) $(HOST_RUSTFLAGS) -L host $< --out-dir . touch $@ check: phf_test.dummy @@ -26,6 +35,7 @@ phf_test.dummy: $(PHF_TEST_SRC) $(RUSTC) --test $(RUSTFLAGS) -L . $< --out-dir . clean: + rm -rf host rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *.exe *-test .PHONY: all check clean