blob: 14e08cb6299b1cf98edeb08d791ce3b9c277a6b3 [file] [log] [blame]
Daniel Dunbar2adb2a52011-11-03 17:56:24 +00001=pod
2
3=head1 NAME
4
5llvm-build - LLVM Project Build Utility
6
7=head1 SYNOPSIS
8
9B<llvm-build> [I<options>]
10
11=head1 DESCRIPTION
12
13B<llvm-build> is a tool for working with LLVM projects that use the LLVMBuild
14system for describing their components.
15
16At heart, B<llvm-build> is responsible for loading, verifying, and manipulating
17the project's component data. The tool is primarily designed for use in
18implementing build systems and tools which need access to the project structure
19information.
20
21=head1 OPTIONS
22
23=over
24
25=item B<-h>, B<--help>
26
27Print the builtin program help.
28
29=item B<--source-root>=I<PATH>
30
31If given, load the project at the given source root path. If this option is not
32given, the location of the project sources will be inferred from the location of
33the B<llvm-build> script itself.
34
35=item B<--print-tree>
36
37Print the component tree for the project.
38
Daniel Dunbarefe2f642011-11-03 17:56:28 +000039=item B<--write-library-table>
40
41Write out the C++ fragment which defines the components, library names, and
42required libraries. This C++ fragment is built into L<llvm-config|llvm-config>
43in order to provide clients with the list of required libraries for arbitrary
44component combinations.
45
Daniel Dunbar2adb2a52011-11-03 17:56:24 +000046=item B<--write-llvmbuild>
47
48Write out new I<LLVMBuild.txt> files based on the loaded components. This is
Daniel Dunbara3217162011-12-12 22:45:35 +000049useful for auto-upgrading the schema of the files. B<llvm-build> will try to a
50limited extent to preserve the comments which were written in the original
51source file, although at this time it only preserves block comments that preceed
52the section names in the I<LLVMBuild> files.
Daniel Dunbar2adb2a52011-11-03 17:56:24 +000053
Daniel Dunbar16889612011-11-04 23:10:37 +000054=item B<--write-cmake-fragment>
55
56Write out the LLVMBuild in the form of a CMake fragment, so it can easily be
57consumed by the CMake based build system. The exact contents and format of this
58file are closely tied to how LLVMBuild is integrated with CMake, see LLVM's
59top-level CMakeLists.txt.
60
Daniel Dunbar02271a72011-11-03 22:46:19 +000061=item B<--write-make-fragment>
62
63Write out the LLVMBuild in the form of a Makefile fragment, so it can easily be
64consumed by a Make based build system. The exact contents and format of this
65file are closely tied to how LLVMBuild is integrated with the Makefiles, see
66LLVM's Makefile.rules.
67
Daniel Dunbar2adb2a52011-11-03 17:56:24 +000068=item B<--llvmbuild-source-root>=I<PATH>
69
70If given, expect the I<LLVMBuild> files for the project to be rooted at the
71given path, instead of inside the source tree itself. This option is primarily
72designed for use in conjunction with B<--write-llvmbuild> to test changes to
73I<LLVMBuild> schema.
74
75=back
76
77=head1 EXIT STATUS
78
79B<llvm-build> exits with 0 if operation was successful. Otherwise, it will exist
80with a non-zero value.
81
82=head1 AUTHOR
83
84Maintained by the LLVM Team (L<http://llvm.org/>).
85
86=cut