Commit Graph

18 Commits

Author SHA1 Message Date
Edwin Brady
c7f893f6aa 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).
2020-05-16 18:08:00 +01:00
Edwin Brady
6ef86bc5d6 Fix check in findOffset 2020-05-16 18:05:45 +01:00
Edwin Brady
4c35210025
Merge pull request #370 from ska80/fix-makefiles
Refactor makefiles
2020-05-16 17:34:51 +01:00
Edwin Brady
560449e087 Check bounds on substring
Fixes #379
2020-05-16 13:50:37 +01:00
Edwin Brady
87c54caa27 Do compiling/inlining per module
Compiled and inlined code is now written to the ttc, to save having to
compile everything at the end even if some definitions don't need
recompiling.
2020-05-14 11:42:09 +01:00
Kamil Shakirov
75a4564a96 Suppress some expected warnings 2020-05-13 17:02:55 +06:00
Kamil Shakirov
2ad471a5e3 Refactor makefiles to use some common options 2020-05-13 16:23:07 +06:00
Edwin Brady
61fae5c040
Merge pull request #310 from Kaiepi/bsd-builds
Fix builds on *BSD
2020-04-27 15:21:37 +01:00
Edwin Brady
838e5cbe9e realloc slightly better than malloc+free
Since it may be possible to reuse the space in place, and this all but
eliminates the remaining sys time.
2020-04-24 16:09:31 +01:00
Edwin Brady
0688728eb3 Run time system improvements
We shouldn't free the old heap if it's the right size, because that'll
execute a system call that could be costly. We can just reuse it!
2020-04-24 15:52:12 +01:00
Ben Davies
93871c5fb9 Fix builds on *BSD
This makes it so gmake gets used instead of make on *BSD, refactors how
platforms are handled in general.
2020-04-22 11:09:05 -03:00
Christian Rasmussen
645f0a809e Add import to fix build on macOS 2020-03-09 22:47:04 +01:00
Edwin Brady
dcaaed2060 Remove -DHAS_PTHREAD from rts
We don't use it (the performance overhead is too much) so don't require
it to be linked in.
2020-03-06 15:48:01 +00:00
Edwin Brady
09447e3dc6 Add our own version of fileModifiedTime
This is needed to get the time correctly on 32 bit systems (for example,
a Raspberry Pi!) otherwise it reports a negative number for the current
time...
2020-03-06 09:30:33 +00:00
Edwin Brady
2c2acdcfac Reorganise build system to go via generating C
This has two main advantages: firstly, it actually makes the build slightly
faster and less memory intensive, because Idris doesn't fork a new
process and eat all the memory! Secondly, it means we can build a
distribution with the C file, for building on machines which don't have
Idris 1 available.

Also includes a script for building such a distribution.

I expect someone who is better a writing Makefiles than me can tidy this
up. There are almost certainly problems on Windows too - please help if
you can!

There are new Make targets 'all-fromc' and 'install-fromc' which don't
require building from Idris source, so that we can build with no Idris 1
available.

A small consequence: make install-exec no longer builds the idris2
executable, just installs it.
2020-03-05 17:16:20 +00:00
Kamil Shakirov
d3820e1197 Improve .gitignore patterns 2020-03-02 14:21:43 +06:00
Kamil Shakirov
b38f6f98c6 Improve 'idris2c' makefile target 2020-02-26 13:00:25 +06:00
Edwin Brady
da675b38a0 Add some machinery to generate C
This is towards making a distribution that allows building from C,
rather than having to build from the Idris source, to make it easier to
install.
2020-02-25 14:09:08 +00:00