aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/cc/clang.txt
blob: 8b09831d6acba6900b8f77e2f5c367bf01dd1f5f (plain)
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
macro_name CLANG

binary_name clang++

output_to_option "-o "
add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l

lang_flags "-std=c++11 -D_REENTRANT -fstack-protector"

warning_flags "-Wall -Wextra -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wunreachable-code"
maintainer_warning_flags "-Qunused-arguments -Werror -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=unreachable-code"

compile_flags_release "-c"
compile_flags_debug   "-c -g"
lib_opt_flags_release "-O3"
app_opt_flags_release "-O2"

shared_flags "-fPIC"
coverage_flags "--coverage"

visibility_build_flags "-fvisibility=hidden"
visibility_attribute '__attribute__((visibility("default")))'

makefile_style gmake

<so_link_commands>
darwin        -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME)"
darwin-debug  -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME)"

# The default works for GNU ld and several other Unix linkers
default       -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)"
default-debug -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)"
</so_link_commands>

<binary_link_commands>
linux         -> "$(LINKER) -Wl,-rpath=\$$ORIGIN"
linux-debug   -> "$(LINKER) -Wl,-rpath=\$$ORIGIN"
default       -> "$(LINKER)"
default-debug -> "$(LINKER)"
</binary_link_commands>

<isa_flags>
sse2   -> "-msse2"
ssse3  -> "-mssse3"
sse4.1 -> "-msse4.1"
sse4.2 -> "-msse4.2"
avx2   -> "-mavx2"
bmi2   -> "-mbmi2"
aesni  -> "-maes -mpclmul -mssse3"
rdrand -> "-mrdrnd"
sha    -> "-msha"
altivec -> "-maltivec"
</isa_flags>

<mach_opt>
x86_64      -> "-march=SUBMODEL"
nehalem     -> "-march=corei7"
sandybridge -> "-march=corei7-avx"
ivybridge   -> "-march=core-avx-i"
</mach_opt>

<mach_abi_linking>
all     -> "-pthread"

x86_64  -> "-m64"
ppc64   -> "-m64"

netbsd  -> "-D_NETBSD_SOURCE"
</mach_abi_linking>