-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
csources are built with build.sh, which only compiles each C file after each other, using only 1 CPU core.
I see two ways for parallelizing this:
- use
jobsandwait(both POSIX) to build a little process pool in build.sh - Or use simple POSIX conforming makefiles, like this:
CC=gcc
LINKER=gcc
COMP_FLAGS=-w -O3 -fno-strict-aliasing
LINK_FLAGS=-ldl -lm
binDir=bin
.POSIX:
%.o: %.c
$(CC) $(COMP_FLAGS) -I.. -c $< -o $@
nim: nim.o stdlib_system.o testability.o commands.o stdlib_os.o stdlib_strutils.o stdlib_parseutils.o stdlib_times.o stdlib_posix.o msgs.o options.o lists.o stdlib_strtabs.o stdlib_hashes.o stdlib_osproc.o stdlib_streams.o stdlib_cpuinfo.o stdlib_linux.o stdlib_sets.o stdlib_math.o stdlib_tables.o ropes.o platform.o crc.o stdlib_sockets.o stdlib_unsigned.o nversion.o condsyms.o idents.o extccomp.o wordrecg.o nimblecmd.o stdlib_parseopt.o lexer.o nimlexbase.o llstream.o nimconf.o main.o ast.o stdlib_intsets.o idgen.o astalgo.o rodutils.o syntaxes.o parser.o pbraces.o filters.o renderer.o filter_tmpl.o rodread.o types.o trees.o stdlib_memfiles.o rodwrite.o passes.o magicsys.o nimsets.o bitsets.o importer.o lookups.o semdata.o treetab.o vmdef.o prettybase.o stdlib_lexbase.o sem.o semfold.o saturate.o procfind.o pragmas.o semtypinst.o sigmatch.o parampatterns.o pretty.o docgen.o docutils_rstast.o stdlib_json.o stdlib_unicode.o docutils_rst.o docutils_rstgen.o docutils_highlite.o stdlib_sequtils.o stdlib_algorithm.o sempass2.o guards.o stdlib_xmltree.o stdlib_macros.o stdlib_cgi.o stdlib_cookies.o typesrenderer.o transf.o cgmeth.o lambdalifting.o lowerings.o vm.o vmgen.o vmdeps.o evaltempl.o aliases.o patterns.o semmacrosanity.o semparallel.o cgen.o ccgutils.o cgendata.o ccgmerge.o jsgen.o passaux.o depends.o docgen2.o service.o modules.o
$(LINKER) -o $@ $^ $(LINK_FLAGS)
.PHONY: clean
clean:
rm -f *.oAny opinions?