1 ##===- tools/Makefile --------------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
12 include $(LEVEL)/Makefile.config
14 # Build clang if present.
16 ifneq ($(CLANG_SRC_ROOT),)
17 OPTIONAL_PARALLEL_DIRS := $(CLANG_SRC_ROOT)
19 OPTIONAL_PARALLEL_DIRS := clang
22 # Build LLD and LLDB if present. Note LLDB must be built last as it depends on
23 # the wider LLVM infrastructure (including Clang).
24 OPTIONAL_PARALLEL_DIRS += lld
27 # NOTE: The tools are organized into five groups of four consisting of one
28 # large and three small executables. This is done to minimize memory load
29 # in parallel builds. Please retain this ordering.
31 PARALLEL_DIRS := opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link \
32 lli llvm-extract llvm-mc bugpoint llvm-bcanalyzer llvm-diff \
33 macho-dump llvm-objdump llvm-readobj llvm-rtdyld \
34 llvm-dwarfdump llvm-cov llvm-size llvm-stress llvm-mcmarkup \
35 llvm-profdata llvm-symbolizer obj2yaml yaml2obj llvm-c-test \
36 llvm-vtabledump verify-uselistorder dsymutil
38 # If Intel JIT Events support is configured, build an extra tool to test it.
39 ifeq ($(USE_INTEL_JITEVENTS), 1)
40 PARALLEL_DIRS += llvm-jitlistener
43 # Let users override the set of tools to build from the command line.
45 OPTIONAL_PARALLEL_DIRS :=
46 OPTIONAL_DIRS := $(findstring lldb,$(ONLY_TOOLS))
47 PARALLEL_DIRS := $(filter-out lldb,$(ONLY_TOOLS))
50 # These libraries build as dynamic libraries (.dylib /.so), they can only be
51 # built if ENABLE_PIC is set.
53 ifeq ($(ENABLE_PIC),1)
54 # gold only builds if binutils is around. It requires "lto" to build before
55 # it so it is added to DIRS. llvm-lto also requires lto
61 PARALLEL_DIRS += bugpoint-passes
65 PARALLEL_DIRS += polly
69 # On Win32, loadable modules can be built with ENABLE_SHARED.
70 ifneq ($(ENABLE_SHARED),1)
71 ifneq (,$(filter $(HOST_OS), Cygwin MingW))
72 PARALLEL_DIRS := $(filter-out bugpoint-passes, \
77 ifneq (,$(filter go,$(BINDINGS_TO_BUILD)))
78 PARALLEL_DIRS += llvm-go
81 include $(LEVEL)/Makefile.common