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 \
31 # Let users override the set of tools to build from the command line.
33 OPTIONAL_PARALLEL_DIRS
:=
34 OPTIONAL_DIRS
:= $(findstring lldb
,$(ONLY_TOOLS
))
35 PARALLEL_DIRS
:= $(filter-out lldb
,$(ONLY_TOOLS
))
38 include $(LEVEL
)/Makefile.config
41 # These libraries build as dynamic libraries (.dylib /.so), they can only be
42 # built if ENABLE_PIC is set.
44 ifeq ($(ENABLE_PIC
),1)
45 # gold only builds if binutils is around. It requires "lto" to build before
46 # it so it is added to DIRS.
53 PARALLEL_DIRS
+= bugpoint-passes
55 # The edis library is only supported if ARM and/or X86 are enabled, and if
56 # LLVM is being built PIC on platforms that support dylibs.
57 ifneq ($(DISABLE_EDIS
),1)
58 ifneq ($(filter $(TARGETS_TO_BUILD
), X86 ARM
),)
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 include $(LEVEL
)/Makefile.common