git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Automatically add UCN pscpp switch if using gcc
100baf6Andy Arvanitis
support/Makefile+6−1
@@ -26,6 +26,11 @@ BIN := main
26override PURSFLAGS += compile --codegen corefn
26override PURSFLAGS += compile --codegen corefn
27override CXXFLAGS += --std=c++11
27override CXXFLAGS += --std=c++11
28
28
29+CXXVERSION = $(shell $(CXX) --version)
30+ifneq (,$(findstring g++,$(CXXVERSION)))
31+ PSCPPFLAGS += "--ucns"
32+endif
33+
29DEBUG := "-DDEBUG -g"
34DEBUG := "-DDEBUG -g"
30RELEASE := "-DNDEBUG -O3"
35RELEASE := "-DNDEBUG -O3"
31
36
@@ -53,7 +58,7 @@ corefn: $(PURESCRIPT_PKGS)
53.PHONY: codegen
58.PHONY: codegen
54codegen: COREFN_SRCS=$(call rwildcard,$(OUTPUT)/,corefn.json)
59codegen: COREFN_SRCS=$(call rwildcard,$(OUTPUT)/,corefn.json)
55codegen: corefn
60codegen: corefn
56− @$(PSCPP) $(COREFN_SRCS)
61+ @$(PSCPP) $(PSCPPFLAGS) $(COREFN_SRCS)
57
62
58$(PURESCRIPT_PKGS):
63$(PURESCRIPT_PKGS):
59 @echo "Getting packages using" $(PSC_PACKAGE) "..."
64 @echo "Getting packages using" $(PSC_PACKAGE) "..."