-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommon-flags.mk
42 lines (39 loc) · 1.09 KB
/
common-flags.mk
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
# Copyright IAMRobot 2015-2016 (c)
# Define some common flags to be included in Makefile.
# These flags may include syntax fixes, warning enhancements, and optimizations.
GRAPHITE := -fgraphite \
-fgraphite-identity
HARDWARE := -march=armv7-a \
-mcpu=cortex-a9 \
-mtune=cortex-a9 \
-marm
LOOP := -fipa-sra \
-fgcse-sm \
-fgcse-las \
-fgcse-after-reload \
-fmodulo-sched \
-fira-loop-pressure \
-fira-hoist-pressure
LSAN := -fsanitize=leak
LTO := -flto=2
OPENMP := -fopenmp \
-ftree-parallelize-loops=2 \
-ftree-parallelize-all
# Create two sets of flags, debug and release, for easy incorporation into build.
DEBUG := -Og \
-g3 \
-Wall \
-Werror \
-DDEBUG \
-std=gnu11 \
$(HARDWARE)
RELEASE := -O3 \
-g0 \
-DNDEBUG \
-std=gnu11 \
$(GRAPHITE) \
$(HARDWARE) \
$(LOOP)\
$(LSAN) \
$(LTO) \
$(OPENMP)