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 LLDB if present. Note LLDB must be built last as it depends on the
23 # wider LLVM infrastructure (including Clang).
26 # NOTE: The tools are organized into five groups of four consisting of one
27 # large and three small executables. This is done to minimize memory load
28 # in parallel builds. Please retain this ordering.
30 PARALLEL_DIRS := opt llvm-as llvm-dis \
31 llc llvm-ranlib llvm-ar llvm-nm \
32 llvm-ld llvm-prof llvm-link \
33 lli llvm-extract llvm-mc \
34 bugpoint llvm-bcanalyzer llvm-stub \
35 llvm-diff macho-dump llvm-objdump \
36 llvm-rtdyld llvm-dwarfdump llvm-cov \
39 # Let users override the set of tools to build from the command line.
41 OPTIONAL_PARALLEL_DIRS :=
42 OPTIONAL_DIRS := $(findstring lldb,$(ONLY_TOOLS))
43 PARALLEL_DIRS := $(filter-out lldb,$(ONLY_TOOLS))
46 # These libraries build as dynamic libraries (.dylib /.so), they can only be
47 # built if ENABLE_PIC is set.
49 ifeq ($(ENABLE_PIC),1)
50 # gold only builds if binutils is around. It requires "lto" to build before
51 # it so it is added to DIRS.
58 PARALLEL_DIRS += bugpoint-passes
62 PARALLEL_DIRS += polly
66 # On Win32, loadable modules can be built with ENABLE_SHARED.
67 ifneq ($(ENABLE_SHARED),1)
68 ifneq (,$(filter $(HOST_OS), Cygwin MingW))
69 PARALLEL_DIRS := $(filter-out bugpoint-passes, \
74 include $(LEVEL)/Makefile.common