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 # Build clang if present.
13 OPTIONAL_PARALLEL_DIRS := clang
15 # Build LLDB if present. Note LLDB must be built last as it depends on the
16 # wider LLVM infrastructure (including Clang).
19 # NOTE: The tools are organized into five groups of four consisting of one
20 # large and three small executables. This is done to minimize memory load
21 # in parallel builds. Please retain this ordering.
23 PARALLEL_DIRS := opt llvm-as llvm-dis \
24 llc llvm-ranlib llvm-ar llvm-nm \
25 llvm-ld llvm-prof llvm-link \
26 lli llvm-extract llvm-mc \
27 bugpoint llvm-bcanalyzer llvm-stub \
28 llvmc llvm-diff macho-dump llvm-objdump
30 # Let users override the set of tools to build from the command line.
32 OPTIONAL_PARALLEL_DIRS :=
33 OPTIONAL_DIRS := $(findstring lldb,$(ONLY_TOOLS))
34 PARALLEL_DIRS := $(filter-out lldb,$(ONLY_TOOLS))
37 include $(LEVEL)/Makefile.config
40 # These libraries build as dynamic libraries (.dylib /.so), they can only be
41 # built if ENABLE_PIC is set.
43 ifeq ($(ENABLE_PIC),1)
44 # gold only builds if binutils is around. It requires "lto" to build before
45 # it so it is added to DIRS.
52 PARALLEL_DIRS += bugpoint-passes
54 # The edis library is only supported if ARM and/or X86 are enabled, and if
55 # LLVM is being built PIC on platforms that support dylibs.
56 ifneq ($(DISABLE_EDIS),1)
57 ifneq ($(filter $(TARGETS_TO_BUILD), X86 ARM),)
64 PARALLEL_DIRS += polly
68 # On Win32, loadable modules can be built with ENABLE_SHARED.
69 ifneq ($(ENABLE_SHARED),1)
70 ifneq (,$(filter $(HOST_OS), Cygwin MingW))
71 PARALLEL_DIRS := $(filter-out bugpoint-passes, \
76 include $(LEVEL)/Makefile.common