2004-01-05 13:28:15 +08:00
|
|
|
##===- tools/Makefile --------------------------------------*- Makefile -*-===##
|
2008-11-26 05:38:12 +08:00
|
|
|
#
|
2003-10-21 06:29:16 +08:00
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
2007-12-30 04:07:17 +08:00
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
2008-11-26 05:38:12 +08:00
|
|
|
#
|
2003-10-21 06:29:16 +08:00
|
|
|
##===----------------------------------------------------------------------===##
|
2004-01-05 13:28:15 +08:00
|
|
|
|
2002-12-06 11:53:40 +08:00
|
|
|
LEVEL := ..
|
2009-01-24 08:00:41 +08:00
|
|
|
|
2011-10-16 10:54:26 +08:00
|
|
|
include $(LEVEL)/Makefile.config
|
|
|
|
|
2009-01-24 08:00:41 +08:00
|
|
|
# Build clang if present.
|
2011-10-16 10:54:26 +08:00
|
|
|
|
|
|
|
ifneq ($(CLANG_SRC_ROOT),)
|
|
|
|
OPTIONAL_PARALLEL_DIRS := $(CLANG_SRC_ROOT)
|
|
|
|
else
|
|
|
|
OPTIONAL_PARALLEL_DIRS := clang
|
|
|
|
endif
|
2009-01-24 08:00:41 +08:00
|
|
|
|
2015-06-08 12:04:13 +08:00
|
|
|
# Build LLDB if present. Note LLDB must be built last as it depends on
|
2014-06-05 16:49:55 +08:00
|
|
|
# the wider LLVM infrastructure (including Clang).
|
2014-10-14 14:56:28 +08:00
|
|
|
OPTIONAL_DIRS := lldb
|
2011-02-20 12:17:15 +08:00
|
|
|
|
2008-11-26 05:38:12 +08:00
|
|
|
# NOTE: The tools are organized into five groups of four consisting of one
|
|
|
|
# large and three small executables. This is done to minimize memory load
|
2007-02-10 01:02:07 +08:00
|
|
|
# in parallel builds. Please retain this ordering.
|
2011-03-19 01:11:39 +08:00
|
|
|
DIRS := llvm-config
|
2013-10-02 23:42:23 +08:00
|
|
|
PARALLEL_DIRS := opt llvm-as llvm-dis llc llvm-ar llvm-nm llvm-link \
|
2013-10-02 23:14:13 +08:00
|
|
|
lli llvm-extract llvm-mc bugpoint llvm-bcanalyzer llvm-diff \
|
2015-09-23 01:46:10 +08:00
|
|
|
llvm-objdump llvm-readobj llvm-rtdyld \
|
2013-10-02 23:14:13 +08:00
|
|
|
llvm-dwarfdump llvm-cov llvm-size llvm-stress llvm-mcmarkup \
|
2014-07-25 07:14:40 +08:00
|
|
|
llvm-profdata llvm-symbolizer obj2yaml yaml2obj llvm-c-test \
|
2015-08-21 10:48:20 +08:00
|
|
|
llvm-cxxdump verify-uselistorder dsymutil llvm-pdbdump \
|
2015-12-01 08:48:34 +08:00
|
|
|
llvm-split sancov llvm-dwp
|
2007-12-09 07:58:46 +08:00
|
|
|
|
2012-11-27 09:24:25 +08:00
|
|
|
# If Intel JIT Events support is configured, build an extra tool to test it.
|
|
|
|
ifeq ($(USE_INTEL_JITEVENTS), 1)
|
|
|
|
PARALLEL_DIRS += llvm-jitlistener
|
|
|
|
endif
|
|
|
|
|
2009-04-26 06:08:52 +08:00
|
|
|
# Let users override the set of tools to build from the command line.
|
|
|
|
ifdef ONLY_TOOLS
|
|
|
|
OPTIONAL_PARALLEL_DIRS :=
|
2011-02-20 12:17:15 +08:00
|
|
|
OPTIONAL_DIRS := $(findstring lldb,$(ONLY_TOOLS))
|
|
|
|
PARALLEL_DIRS := $(filter-out lldb,$(ONLY_TOOLS))
|
2009-04-26 06:08:52 +08:00
|
|
|
endif
|
|
|
|
|
2010-03-05 08:59:18 +08:00
|
|
|
# These libraries build as dynamic libraries (.dylib /.so), they can only be
|
|
|
|
# built if ENABLE_PIC is set.
|
2010-12-16 23:42:26 +08:00
|
|
|
ifndef ONLY_TOOLS
|
2009-03-03 15:45:09 +08:00
|
|
|
ifeq ($(ENABLE_PIC),1)
|
2010-11-29 08:20:34 +08:00
|
|
|
# gold only builds if binutils is around. It requires "lto" to build before
|
2013-09-20 06:15:52 +08:00
|
|
|
# it so it is added to DIRS. llvm-lto also requires lto
|
|
|
|
DIRS += lto llvm-lto
|
2010-11-29 08:20:34 +08:00
|
|
|
ifdef BINUTILS_INCDIR
|
2013-09-20 06:15:52 +08:00
|
|
|
DIRS += gold
|
2010-11-29 08:20:34 +08:00
|
|
|
endif
|
2010-07-21 02:25:19 +08:00
|
|
|
|
2010-11-29 08:20:34 +08:00
|
|
|
PARALLEL_DIRS += bugpoint-passes
|
2006-09-09 02:00:43 +08:00
|
|
|
endif
|
2006-05-31 05:20:55 +08:00
|
|
|
|
2010-10-30 08:54:26 +08:00
|
|
|
ifdef LLVM_HAS_POLLY
|
|
|
|
PARALLEL_DIRS += polly
|
|
|
|
endif
|
2010-12-16 23:42:26 +08:00
|
|
|
endif
|
2010-10-30 08:54:26 +08:00
|
|
|
|
2010-11-29 08:20:28 +08:00
|
|
|
# On Win32, loadable modules can be built with ENABLE_SHARED.
|
|
|
|
ifneq ($(ENABLE_SHARED),1)
|
2010-11-29 16:58:11 +08:00
|
|
|
ifneq (,$(filter $(HOST_OS), Cygwin MingW))
|
2010-11-29 08:20:28 +08:00
|
|
|
PARALLEL_DIRS := $(filter-out bugpoint-passes, \
|
|
|
|
$(PARALLEL_DIRS))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-10-23 10:33:23 +08:00
|
|
|
ifneq (,$(filter go,$(BINDINGS_TO_BUILD)))
|
|
|
|
PARALLEL_DIRS += llvm-go
|
|
|
|
endif
|
|
|
|
|
2006-09-09 02:33:49 +08:00
|
|
|
include $(LEVEL)/Makefile.common
|