-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathBuild.mak
51 lines (41 loc) · 1.85 KB
/
Build.mak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Makd auto-detects if Ocean's test runner should be used based on submodules,
# but we -of course- don't have Ocean as a submodule, so we set it explicitly.
TEST_RUNNER_MODULE := ocean.core.UnitTestRunner
# This will make D2 unittests fail if stomping prevention is triggered
# (only with dmd-transitional, no effect on other compilers)
export ASSERT_ON_STOMPING_PREVENTION=1
# Common D compiler flags
override DFLAGS += -I$C/submodules/openssl/source/ -w -version=GLIBC
# Treat deprecations as errors to ensure ocean doesn't use own deprecated
# symbols internally. Disable it on explicit flag to make possible regression
# testing in D upstream.
ifneq ($(ALLOW_DEPRECATIONS),1)
override DFLAGS += -de
endif
# Default to OpenSSL 3 unless otherwise specified
ifneq ($(OPENSSL_VERSION_STRING),)
override DFLAGS += -version=$(OPENSSL_VERSION_STRING)
else
override DFLAGS += -version=DeimosOpenSSL_3_0
endif
# Remove coverage files
clean += .*.lst
$O/test-%: override LDFLAGS += -lebtree
$O/test-filesystemevent: override LDFLAGS += -lrt
$O/test-httpserver: override LDFLAGS += -lglib-2.0
$O/test-asyncio: override LDFLAGS += -lglib-2.0
$O/test-signalext: override LDFLAGS += -lglib-2.0
$O/test-prometheusstats: override LDFLAGS += -lglib-2.0
$O/test-reopenfiles: override LDFLAGS += -lglib-2.0
$O/test-sysstats: override LDFLAGS += -lglib-2.0
$O/test-taskext_daemon: override LDFLAGS += -lglib-2.0
$O/test-unixsockext: override LDFLAGS += -lglib-2.0
# Link unittests to all used libraries
# TODO: Remove the specific version of libssl and libcrypto once the bindings
# for libssl have been updated to v1.1.x
$O/%unittests: override LDFLAGS += -lglib-2.0 -lpcre -lxml2 -lxslt -lebtree \
-lreadline -lhistory -llzo2 -lbz2 -lz -ldl -lgcrypt -lgpg-error -lrt \
-lssl -lcrypto
# Remove deprecated modules from testing:
#TEST_FILTER_OUT += \
$C/src/ocean/path/to/module.d