1BEAR(1) BEAR(1)
2
3
4
6 Bear - Build EAR
7
9 bear [options] -- [build command]
10
12 Bear is a tool to generate compilation database for clang tooling.
13
14 The JSON compilation database <http://clang.llvm.org/docs/JSONCompila‐
15 tionDatabase.html> is used in Clang project to provide information how
16 a single compilation unit was processed. When that is available then
17 it is easy to re-run the compilation with different programs.
18
19 Bear executes the original build command and intercept the command exe‐
20 cutions issued by the build tool. From the log of command executions
21 it tries to identify the compiler calls and creates the final compila‐
22 tion database.
23
25 --version
26 Print version number.
27
28 --help Print help message.
29
30 --verbose
31 Enable verbose logging.
32
33 --output file
34 Specify output file. (Default file name provided.) The output
35 is a JSON compilation database.
36
37 --append
38 Use previously generated output file and append the new entries
39 to it. This way you can run Bear continuously during work, and
40 it keeps the compilation database up to date. File deletion and
41 addition are both considered. But build process change (compil‐
42 er flags change) might cause duplicate entries.
43
44 --config file
45 Specify a configuration file. The configuration file captures
46 how the output should be formatted and which entries it shall
47 contain.
48
49 --force-preload
50 Force to use the dynamic linker method of intercept command.
51
52 --force-wrapper
53 Force to use the compiler wrapper method of intercept command.
54
56 The JSON compilation database definition changed over time. The cur‐
57 rent version of Bear generates entries where:
58
59 directory
60 has absolute path.
61
62 file has absolute path.
63
64 output has absolute path.
65
66 arguments
67 used instead of command to avoid shell escaping problems. (Con‐
68 figuration can force to emit the command field.) The compiler as
69 the first argument has absolute path. Some non compilation re‐
70 lated flags are filtered out from the final output.
71
73 Read citnames man page for the content of this file. bear is not read‐
74 ing the content of this file, but passing the file name to citnames.
75
77 The exit status of the program is the exit status of the build command.
78 Except when the program itself crashes, then it sets to non zero.
79
81 intercept(1), citnames(1)
82
84 Copyright (C) 2012-2021 by László Nagy <https://github.com/rizsot‐
85 to/Bear>
86
88 László Nagy.
89
90
91
92Bear User Manuals May 10, 2019 BEAR(1)