docs: add missing `build` module
[barectf.git] / docs / modules / build / pages / index.adoc
1 = Build your application with a generated tracer
2
3 To build your application with a tracer which barectf
4 xref:cli:index.adoc[generates] using https://gcc.gnu.org/[GCC]:
5
6 [.cl]
7 [verse]
8 [.prompt]##$## gcc my-app.c barectf.c
9
10 Note that you probably need to build a
11 xref:platform:index.adoc[platform] into your application too:
12
13 [.cl]
14 [verse]
15 [.prompt]##$## gcc my-app.c barectf.c platform.c
16
17 You can also build the tracer and/or the platform as dynamic libraries
18 and link your application to them if your system supports this feature.
19
20 [[req]]
21 == Compiler requirements
22
23 barectf xref:cli:index.adoc[generates] ANSI{nbsp}C code, with the
24 exception of a requirement for `stdint.h`, which is part of C99.
25
26 If your C{nbsp}standard library doesn't offer `stdint.h`, you need to
27 create this file and define the following type definitions:
28
29 * `uint8_t`
30 * `uint16_t`
31 * `uint32_t`
32 * `uint64_t`
33 * `int8_t`
34 * `int16_t`
35 * `int32_t`
36 * `int64_t`
37
38 == Supported C{nbsp}compilers
39
40 The C{nbsp}code which barectf generates is known to be compilable
41 by the following compilers:
42
43 * https://gcc.gnu.org/[GCC] and
44 G++ (tested with the IA-32, x86-64, MIPS, ARM, and AVR architectures;
45 also tested with and without the
46 https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html[`+-ansi+` option])
47
48 * https://clang.llvm.org/[Clang] and Clang++ (tested with and without
49 the
50 https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-ansi[`+-ansi+` option])
51
52 * https://visualstudio.microsoft.com/[Microsoft Visual Studio] 2008
53 (with a <<req,custom `stdint.h`>>)
54
55 * Microsoft Visual Studio 2010+
56
57 * https://bellard.org/tcc/[TCC]
58
59 * https://github.com/rui314/8cc[8cc]
This page took 0.031482 seconds and 4 git commands to generate.