-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathCPPVARIABLES.bzl
More file actions
103 lines (99 loc) · 2.27 KB
/
Copy pathCPPVARIABLES.bzl
File metadata and controls
103 lines (99 loc) · 2.27 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
"Global C++ compilation and link flags"
DDS_CPPOPTS = select({
"//:build_macos": [
"-O3",
"-flto=thin",
"-mtune=generic",
"-fPIC",
"-Wpedantic",
"-Wall",
"-Wno-character-conversion",
"-Werror",
],
"//:debug_build_macos": [
"-g",
"-mtune=generic",
"-fPIC",
"-Wpedantic",
"-Wall",
"-Wno-character-conversion",
"-Werror",
],
"//:build_linux": [
"-O3",
"-fPIC",
"-Wpedantic",
"-Wall",
"-Wno-character-conversion",
"-Werror",
],
"//:debug_build_linux": [
"-g",
"-O2",
"-fPIC",
"-Wpedantic",
"-Wall",
"-Wno-character-conversion",
"-Werror",
],
"//:build_windows": [
"/O2",
"/std:c++20",
"/W4",
"/WX",
"/permissive-",
],
"//:debug_build_windows": [
"/Od",
"/Zi",
"/std:c++20",
"/W4",
"/WX",
"/permissive-",
],
"//:build_wasm": [
"-O3",
"-flto",
"-Wpedantic",
"-Wall",
"-Werror",
"-fexceptions",
],
"//conditions:default": [
"-std=c++20"
],
})
DDS_LOCAL_DEFINES = select({
"//:build_macos": [],
"//:debug_build_macos": [],
"//:build_linux": [],
"//:debug_build_linux": [],
"//:build_wasm": [],
"//conditions:default": [],
}) + select({
"//:debug_all": ["DDS_DEBUG_ALL"],
"//conditions:default": [],
}) + select({
"//:tt_context_ownership": ["DDS_TT_CONTEXT_OWNERSHIP"],
"//conditions:default": [],
}) + select({
"//:tt_reset_debug": ["DDS_DEBUG_TT_RESET"],
"//conditions:default": [],
}) + select({
"//:ab_stats": ["DDS_AB_STATS"],
"//conditions:default": [],
})
DDS_LINKOPTS = select({
"//:build_macos": ["-flto=thin"],
"//:debug_build_macos": [],
"//:build_linux": [],
"//:debug_build_linux": [],
"//conditions:default": [],
})
# Per-target define to enable scheduler timing when desired.
# Controlled with: --define=scheduler=true
# Usage in BUILD files: local_defines = DDS_LOCAL_DEFINES + DDS_SCHEDULER_DEFINE
DDS_SCHEDULER_DEFINE = select({
"//:scheduler": ["DDS_SCHEDULER"],
"//conditions:default": [],
})