syncthing/lib
Jakob Borg 7fa699e159
build, lib/build: Build faster (#6538)
This changes the build script to build all the things in one go
invocation, instead of one invocation per cmd. This is a lot faster
because it means more things get compiled concurrently. It's especially
a lot faster when things *don't* need to be rebuilt, possibly because it
only needs to build the dependency map and such once instead of once per
binary.

In order for this to work we need to be able to pass the same ldflags to
all the binaries. This means we can't set the program name with an
ldflag.

When it needs to rebuild everything (go clean -cache):

    ( ./old-build -gocmd go1.14.2 build all 2> /dev/null; )  65.82s user 11.28s system 574% cpu 13.409 total
    ( ./new-build -gocmd go1.14.2 build all 2> /dev/null; )  63.26s user 7.12s system 1220% cpu 5.766 total

On a subsequent run (nothing to build, just link the binaries):

    ( ./old-build -gocmd go1.14.2 build all 2> /dev/null; )  26.58s user 7.53s system 582% cpu 5.853 total
    ( ./new-build -gocmd go1.14.2 build all 2> /dev/null; )  18.66s user 2.45s system 1090% cpu 1.935 total
2020-04-16 10:09:33 +02:00
..
api lib/api: Add LDAP search filters (fixes #5376) (#6488) 2020-04-04 11:33:43 +02:00
auto build: Let "go generate" create assets 2018-06-26 10:29:36 +02:00
beacon lib/beacon: Only send to appropriately flagged interfaces (ref #5957) (#6404) 2020-03-17 09:40:37 +01:00
build build, lib/build: Build faster (#6538) 2020-04-16 10:09:33 +02:00
config lib/api: Add LDAP search filters (fixes #5376) (#6488) 2020-04-04 11:33:43 +02:00
connections all: Tweak error creation (#6391) 2020-03-03 22:40:00 +01:00
db lib/db: Remove unused blockFinder global (#6534) 2020-04-14 17:09:59 +02:00
dialer lib/dialer: Preserve nilness in error handling (fixes #6368) (#6369) 2020-02-26 13:16:18 +01:00
discover lib: Faster termination on exit (ref #6319) (#6329) 2020-02-13 14:43:00 +01:00
events lib/events, lib/model: Unflake test and prevent deadlock on event unsubscribing (#6261) 2020-01-11 08:14:05 +01:00
fs lib/{fs,scanner}: gofmt from Go 1.14 (#6509) 2020-04-07 09:31:29 +02:00
ignore lib/ignore: Only skip for toplevel includes (fixes #6487) (#6508) 2020-04-07 10:23:38 +02:00
locations cmd/syncthing, lib/locations: Separate data and config dirs (fixes #4924) (#6309) 2020-03-18 20:58:11 +01:00
logger all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
model lib/model: Harden sanitizePath (#6533) 2020-04-14 20:26:26 +02:00
nat lib: More contextification (#6343) 2020-02-24 21:57:15 +01:00
osutil lib/osutil: Fix "atomic" rename on Windows (ref #6495, ref #6493) (#6510) 2020-04-07 15:38:55 +02:00
pmp lib: More contextification (#6343) 2020-02-24 21:57:15 +01:00
protocol lib/protocol: faster Luhn algorithm and better testing (#6475) 2020-03-29 22:28:04 +02:00
rand lib/rand: Various fixes (#6474) 2020-03-30 23:26:28 +02:00
rc gui, lib/api: Remove CPU & RAM measurements (fixes #6249) (#6393) 2020-03-04 20:27:48 +01:00
relay cmd/strelaypoolsrv: Expose check error to client, fix incorrect response code handling 2020-04-04 13:31:42 +02:00
scanner lib/ignore: Only skip for toplevel includes (fixes #6487) (#6508) 2020-04-07 10:23:38 +02:00
sha256 all: Remove dead code, fix lost msgLen checks (#6129) 2019-11-06 07:09:58 +01:00
signature all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stats all: Propagate errors from NamespacedKV (#6203) 2019-11-30 13:03:24 +01:00
stun lib: More contextification (#6343) 2020-02-24 21:57:15 +01:00
sync lib/sync: Cleanly fail instead of panic in tests (#6088) 2019-10-16 10:11:11 +02:00
syncthing lib/db: Make database GC a service, stop on Stop() (#6518) 2020-04-12 10:26:57 +02:00
testutils lib/model, lib/testutils: Test closing a connection on folder restart (#5707) 2019-05-18 08:53:59 +02:00
tlsutil all: Tweak error creation (#6391) 2020-03-03 22:40:00 +01:00
upgrade all: Tweak error creation (#6391) 2020-03-03 22:40:00 +01:00
upnp lib: More contextification (#6343) 2020-02-24 21:57:15 +01:00
ur lib/ur: Correct freaky error handling (fixes #6499) (#6500) 2020-04-06 09:53:37 +02:00
util lib/util: Fix potential data race (#6477) 2020-03-30 14:10:08 +01:00
versioner lib/versioner: Extended tests of intervals (#6462) 2020-03-31 00:14:05 +02:00
watchaggregator lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
weakhash lib/weakhash: Fix speed reporting in benchmark (#6470) 2020-03-29 17:07:25 +02:00