mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-08-16 11:20:25 +03:00
Reorganise optimisation options for C
It should be -O2 for the rts, but -O2 takes ages for idris2.c so should be saved for releases (also OPT should be able to be edited easily for e.g. adding profiling) Also default to clang (perhaps it would be better if we could check whether clang was available first, but it does a better job as the default overall).
This commit is contained in:
parent
6ef86bc5d6
commit
c7f893f6aa
@ -6,7 +6,7 @@ PREFIX ?= $(HOME)/.idris2
|
||||
OPT =
|
||||
|
||||
# clang compiles the output much faster than gcc!
|
||||
CC ?= clang
|
||||
CC := clang
|
||||
|
||||
##################################################################
|
||||
|
||||
|
2
dist/config.mk
vendored
2
dist/config.mk
vendored
@ -1,6 +1,6 @@
|
||||
include $(IDRIS2_CURDIR)/config.mk
|
||||
|
||||
CFLAGS += -O2 -std=c99 -pipe -fdata-sections -ffunction-sections -D_POSIX_C_SOURCE=200809L
|
||||
CFLAGS += $(OPT) -std=c99 -pipe -fdata-sections -ffunction-sections -D_POSIX_C_SOURCE=200809L
|
||||
|
||||
ifeq ($(OS),bsd)
|
||||
GMP_INCLUDE_DIR = -I/usr/local/include
|
||||
|
2
dist/rts/Makefile
vendored
2
dist/rts/Makefile
vendored
@ -7,7 +7,7 @@ HDRS =idris_rts.h idris_heap.h idris_gc.h idris_gmp.h idris_bitstring.h \
|
||||
idris_opts.h idris_stats.h idris_stdfgn.h idris_net.h \
|
||||
idris_buffer.h idris_utf8.h getline.h
|
||||
|
||||
CFLAGS += $(GMP_INCLUDE_DIR) -DIDRIS_TARGET_OS="\"$(OS)\""
|
||||
CFLAGS += -O2 $(GMP_INCLUDE_DIR) -DIDRIS_TARGET_OS="\"$(OS)\""
|
||||
CFLAGS += -DIDRIS_TARGET_TRIPLE="\"$(MACHINE)\""
|
||||
|
||||
ifeq ($(OS), windows)
|
||||
|
Loading…
Reference in New Issue
Block a user