1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Remove autoconf support

Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

"I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
- Obi Wan Kenobi

Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark

Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D16471

llvm-svn: 258861
This commit is contained in:
Chris Bieneman 2016-01-26 21:29:08 +00:00
parent e5897f542b
commit 1b8d4f74aa
299 changed files with 3 additions and 35010 deletions

295
Makefile
View File

@ -1,295 +0,0 @@
#===- ./Makefile -------------------------------------------*- Makefile -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
LEVEL := .
# Top-Level LLVM Build Stages:
# 1. Build lib/Support and lib/TableGen, which are used by utils (tblgen).
# 2. Build utils, which is used by IR.
# 3. Build IR, which builds the Intrinsics.inc file used by libs.
# 4. Build libs, which are needed by llvm-config.
# 5. Build llvm-config, which determines inter-lib dependencies for tools.
# 6. Build tools, docs, and cmake modules.
#
# When cross-compiling, there are some things (tablegen) that need to
# be build for the build system first.
# If "RC_ProjectName" exists in the environment, and its value is
# "llvmCore", then this is an "Apple-style" build; search for
# "Apple-style" in the comments for more info. Anything else is a
# normal build.
ifneq ($(findstring llvmCore, $(RC_ProjectName)),llvmCore) # Normal build (not "Apple-style").
ifeq ($(BUILD_DIRS_ONLY),1)
DIRS := lib/Support lib/TableGen utils tools/llvm-config
OPTIONAL_DIRS := tools/clang/utils/TableGen
else
DIRS := lib/Support lib/TableGen utils lib/IR lib tools/llvm-shlib \
tools/llvm-config tools docs cmake unittests
OPTIONAL_DIRS := projects bindings
endif
ifeq ($(BUILD_EXAMPLES),1)
OPTIONAL_DIRS += examples
endif
EXTRA_DIST := test unittests llvm.spec include win32 Xcode
include $(LEVEL)/Makefile.config
ifneq ($(ENABLE_SHARED),1)
DIRS := $(filter-out tools/llvm-shlib, $(DIRS))
endif
ifneq ($(ENABLE_DOCS),1)
DIRS := $(filter-out docs, $(DIRS))
endif
ifeq ($(MAKECMDGOALS),libs-only)
DIRS := $(filter-out tools docs, $(DIRS))
OPTIONAL_DIRS :=
endif
ifeq ($(MAKECMDGOALS),install-libs)
DIRS := $(filter-out tools docs, $(DIRS))
OPTIONAL_DIRS := $(filter bindings, $(OPTIONAL_DIRS))
endif
ifeq ($(MAKECMDGOALS),tools-only)
DIRS := $(filter-out docs, $(DIRS))
OPTIONAL_DIRS :=
endif
ifeq ($(MAKECMDGOALS),install-clang)
DIRS := tools/clang/tools/driver tools/clang/lib/Headers \
tools/clang/tools/libclang \
tools/clang/tools/c-index-test \
tools/clang/include/clang-c \
tools/clang/runtime tools/clang/docs \
tools/lto
OPTIONAL_DIRS :=
NO_INSTALL = 1
endif
ifeq ($(MAKECMDGOALS),clang-only)
DIRS := $(filter-out tools docs unittests, $(DIRS)) \
tools/clang tools/lto
OPTIONAL_DIRS :=
endif
ifeq ($(MAKECMDGOALS),unittests)
DIRS := $(filter-out tools docs, $(DIRS)) utils unittests
OPTIONAL_DIRS :=
endif
# Use NO_INSTALL define of the Makefile of each directory for deciding
# if the directory is installed or not
ifeq ($(MAKECMDGOALS),install)
OPTIONAL_DIRS := $(filter bindings, $(OPTIONAL_DIRS))
endif
# Don't build unittests when ONLY_TOOLS is set.
ifneq ($(ONLY_TOOLS),)
DIRS := $(filter-out unittests, $(DIRS))
endif
# If we're cross-compiling, build the build-hosted tools first
ifeq ($(LLVM_CROSS_COMPILING),1)
all:: cross-compile-build-tools
clean::
$(Verb) rm -rf BuildTools
cross-compile-build-tools:
$(Verb) if [ ! -f BuildTools/Makefile ]; then \
$(MKDIR) BuildTools; \
cd BuildTools ; \
unset CFLAGS ; \
unset CXXFLAGS ; \
AR=$(BUILD_AR) ; \
AS=$(BUILD_AS) ; \
LD=$(BUILD_LD) ; \
CC=$(BUILD_CC) ; \
CXX=$(BUILD_CXX) ; \
unset SDKROOT ; \
unset UNIVERSAL_SDK_PATH ; \
configure_opts= ; \
if test "$(ENABLE_LIBCPP)" -ne 0 ; then \
configure_opts="$$configure_opts --enable-libcpp"; \
fi; \
$(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
--host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE) \
--disable-polly $$configure_opts; \
cd .. ; \
fi; \
($(MAKE) -C BuildTools \
BUILD_DIRS_ONLY=1 \
UNIVERSAL= \
UNIVERSAL_SDK_PATH= \
SDKROOT= \
TARGET_NATIVE_ARCH="$(TARGET_NATIVE_ARCH)" \
TARGETS_TO_BUILD="$(TARGETS_TO_BUILD)" \
TARGET_LIBS="$(LIBS)" \
ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \
ENABLE_PROFILING=$(ENABLE_PROFILING) \
ENABLE_COVERAGE=$(ENABLE_COVERAGE) \
DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \
ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \
ENABLE_LIBCPP=$(ENABLE_LIBCPP) \
CFLAGS= \
CXXFLAGS= \
) || exit 1;
endif
# Include the main makefile machinery.
include $(LLVM_SRC_ROOT)/Makefile.rules
# Specify options to pass to configure script when we're
# running the dist-check target
DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR)
.PHONY: debug-opt-prof
debug-opt-prof:
$(Echo) Building Debug Version
$(Verb) $(MAKE)
$(Echo)
$(Echo) Building Optimized Version
$(Echo)
$(Verb) $(MAKE) ENABLE_OPTIMIZED=1
$(Echo)
$(Echo) Building Profiling Version
$(Echo)
$(Verb) $(MAKE) ENABLE_PROFILING=1
dist-hook::
$(Echo) Eliminating files constructed by configure
$(Verb) $(RM) -f \
$(TopDistDir)/include/llvm/Config/config.h \
$(TopDistDir)/include/llvm/Support/DataTypes.h
clang-only: all
tools-only: all
libs-only: all
install-clang: install
install-libs: install
# If SHOW_DIAGNOSTICS is enabled, clear the diagnostics file first.
ifeq ($(SHOW_DIAGNOSTICS),1)
clean-diagnostics:
$(Verb) rm -f $(LLVM_OBJ_ROOT)/$(BuildMode)/diags
.PHONY: clean-diagnostics
all-local:: clean-diagnostics
endif
#------------------------------------------------------------------------
# Make sure the generated files are up-to-date. This must be kept in
# sync with the AC_CONFIG_HEADER and AC_CONFIG_FILE invocations in
# autoconf/configure.ac.
# Note that Makefile.config is covered by its own separate rule
# in Makefile.rules where it can be reused by sub-projects.
#------------------------------------------------------------------------
FilesToConfig := \
bindings/ocaml/llvm/META.llvm \
docs/doxygen.cfg \
llvm.spec \
include/llvm/Config/config.h \
include/llvm/Config/llvm-config.h \
include/llvm/Config/Targets.def \
include/llvm/Config/AsmPrinters.def \
include/llvm/Config/AsmParsers.def \
include/llvm/Config/Disassemblers.def \
include/llvm/Support/DataTypes.h
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
all-local:: $(FilesToConfigPATH)
$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in
$(Echo) Regenerating $*
$(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $*
.PRECIOUS: $(FilesToConfigPATH)
# NOTE: This needs to remain as the last target definition in this file so
# that it gets executed last.
ifneq ($(BUILD_DIRS_ONLY),1)
all::
$(Echo) '*****' Completed $(BuildMode) Build
ifneq ($(ENABLE_OPTIMIZED),1)
$(Echo) '*****' Note: Debug build can be 10 times slower than an
$(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to
$(Echo) '*****' make an optimized build. Alternatively you can
$(Echo) '*****' configure with --enable-optimized.
ifeq ($(SHOW_DIAGNOSTICS),1)
$(Verb) if test -s $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; then \
$(LLVM_SRC_ROOT)/utils/clang-parse-diagnostics-file -a \
$(LLVM_OBJ_ROOT)/$(BuildMode)/diags; \
fi
endif
endif
endif
check-llvm2cpp:
$(Verb)$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1
srpm: $(LLVM_OBJ_ROOT)/llvm.spec
rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec
rpm: $(LLVM_OBJ_ROOT)/llvm.spec
rpmbuild -bb --target $(TARGET_TRIPLE) $(LLVM_OBJ_ROOT)/llvm.spec
show-footprint:
$(Verb) du -sk $(LibDir)
$(Verb) du -sk $(ToolDir)
$(Verb) du -sk $(ExmplDir)
$(Verb) du -sk $(ObjDir)
build-for-llvm-top:
$(Verb) if test ! -f ./config.status ; then \
./configure --prefix="$(LLVM_TOP)/install" \
--with-llvm-gcc="$(LLVM_TOP)/llvm-gcc" ; \
fi
$(Verb) $(MAKE) tools-only
SVN = svn
SVN-UPDATE-OPTIONS =
AWK = awk
# Multiline variable defining a recursive function for finding svn repos rooted at
# a given path. svnup() requires one argument: the root to search from.
define SUB_SVN_DIRS
svnup() {
dirs=`svn status --no-ignore $$1 | awk '/^(I|\?) / {print $$2}' | LC_ALL=C xargs svn info 2>/dev/null | awk '/^Path:\ / {print $$2}'`;
if [ "$$dirs" = "" ]; then
return;
fi;
for f in $$dirs; do
echo $$f;
svnup $$f;
done
}
endef
export SUB_SVN_DIRS
update:
$(SVN) $(SVN-UPDATE-OPTIONS) update $(LLVM_SRC_ROOT)
@eval $$SUB_SVN_DIRS; $(SVN) status --no-ignore $(LLVM_SRC_ROOT) | svnup $(LLVM_SRC_ROOT) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update
happiness: update all check-all
.PHONY: srpm rpm update happiness
# declare all targets at this level to be serial:
.NOTPARALLEL:
else # Building "Apple-style."
# In an Apple-style build, once configuration is done, lines marked
# "Apple-style" are removed with sed! Please don't remove these!
# Look for the string "Apple-style" in utils/buildit/build_llvm.
include $(shell find . -name GNUmakefile) # Building "Apple-style."
endif # Building "Apple-style."

View File

@ -1,69 +0,0 @@
#===-- Makefile.common - Common make rules for LLVM --------*- Makefile -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
#
# This file is included by all of the LLVM makefiles. This file defines common
# rules to do things like compile a .cpp file or generate dependency info.
# These are platform dependent, so this is the file used to specify these
# system dependent operations.
#
# The following functionality can be set by setting incoming variables.
# The variable $(LEVEL) *must* be set:
#
# 1. LEVEL - The level of the current subdirectory from the top of the
# source directory. This level should be expressed as a path, for
# example, ../.. for two levels deep.
#
# 2. DIRS - A list of subdirectories to be built. Fake targets are set up
# so that each of the targets "all", "install", and "clean" each build
# the subdirectories before the local target. DIRS are guaranteed to be
# built in order.
#
# 3. PARALLEL_DIRS - A list of subdirectories to be built, but that may be
# built in any order. All DIRS are built in order before PARALLEL_DIRS are
# built, which are then built in any order.
#
# 4. SOURCES - If specified, this sets the source code filenames. If this
# is not set, it defaults to be all of the .cpp, .c, .y, and .l files
# in the current directory.
#
# 5. SourceDir - If specified, this specifies a directory that the source files
# are in, if they are not in the current directory. This should include a
# trailing / character.
#
# 6. LLVM_SRC_ROOT - If specified, points to the top of the LLVM source tree.
#
# 8. PROJ_SRC_DIR - The directory which contains the current set of Makefiles
# and usually the source code too (unless SourceDir is set).
#
# 9. PROJ_SRC_ROOT - The root directory of the source code being compiled.
#
# 10. PROJ_OBJ_DIR - The directory where object code should be placed.
#
# 11. PROJ_OBJ_ROOT - The root directory for where object code should be
# placed.
#
# For building,
# LLVM, LLVM_SRC_ROOT = PROJ_SRC_ROOT
#
#===-----------------------------------------------------------------------====
#
# Configuration file to set paths specific to local installation of LLVM
#
ifndef LLVM_OBJ_ROOT
include $(LEVEL)/Makefile.config
else
include $(LLVM_OBJ_ROOT)/Makefile.config
endif
#
# Include all of the build rules used for making LLVM
#
include $(LLVM_SRC_ROOT)/Makefile.rules

View File

@ -1,435 +0,0 @@
#===-- Makefile.config - Local configuration for LLVM ------*- Makefile -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
#
# This file is included by Makefile.common. It defines paths and other
# values specific to a particular installation of LLVM.
#
#===------------------------------------------------------------------------===#
# Define LLVM specific info and directories based on the autoconf variables
LLVMPackageName := @PACKAGE_TARNAME@
LLVMVersion := @PACKAGE_VERSION@
LLVM_VERSION_MAJOR := @LLVM_VERSION_MAJOR@
LLVM_VERSION_MINOR := @LLVM_VERSION_MINOR@
LLVM_VERSION_PATCH := @LLVM_VERSION_PATCH@
LLVM_VERSION_SUFFIX := @LLVM_VERSION_SUFFIX@
LLVM_CONFIGTIME := @LLVM_CONFIGTIME@
###########################################################################
# Directory Configuration
# This section of the Makefile determines what is where. To be
# specific, there are several locations that need to be defined:
#
# o LLVM_SRC_ROOT : The root directory of the LLVM source code.
# o LLVM_OBJ_ROOT : The root directory containing the built LLVM code.
#
# o PROJ_SRC_DIR : The directory containing the code to build.
# o PROJ_SRC_ROOT : The root directory of the code to build.
#
# o PROJ_OBJ_DIR : The directory in which compiled code will be placed.
# o PROJ_OBJ_ROOT : The root directory in which compiled code is placed.
#
###########################################################################
PWD := @BINPWD@
# Set the project name to LLVM if its not defined
ifndef PROJECT_NAME
PROJECT_NAME := $(LLVMPackageName)
endif
# The macro below is expanded when 'realpath' is not built-in.
# Built-in 'realpath' is available on GNU Make 3.81.
realpath = $(shell cd $(1); $(PWD))
PROJ_OBJ_DIR := $(call realpath, .)
PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL))
CLANG_SRC_ROOT := @CLANG_SRC_ROOT@
ifeq ($(PROJECT_NAME),$(LLVMPackageName))
LLVM_SRC_ROOT := $(call realpath, @abs_top_srcdir@)
LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@)
PROJ_SRC_ROOT := $(LLVM_SRC_ROOT)
PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))
# See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html
ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT))
$(error In-source builds are not allowed. Please configure from a separate build directory!)
endif
ifneq ($(CLANG_SRC_ROOT),)
CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT))
PROJ_SRC_DIR := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR))
endif
prefix := @prefix@
PROJ_prefix := $(prefix)
program_prefix := @program_prefix@
PROJ_VERSION := $(LLVMVersion)
else
ifndef PROJ_SRC_ROOT
$(error Projects must define PROJ_SRC_ROOT)
endif
ifndef PROJ_OBJ_ROOT
$(error Projects must define PROJ_OBJ_ROOT)
endif
ifndef PROJ_INSTALL_ROOT
$(error Projects must define PROJ_INSTALL_ROOT)
endif
ifndef LLVM_SRC_ROOT
$(error Projects must define LLVM_SRC_ROOT)
endif
ifndef LLVM_OBJ_ROOT
$(error Projects must define LLVM_OBJ_ROOT)
endif
PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
prefix := $(PROJ_INSTALL_ROOT)
PROJ_prefix := $(prefix)
ifndef PROJ_VERSION
PROJ_VERSION := 1.0
endif
endif
INTERNAL_PREFIX := @INTERNAL_PREFIX@
ifneq ($(INTERNAL_PREFIX),)
PROJ_internal_prefix := $(INTERNAL_PREFIX)
else
PROJ_internal_prefix := $(prefix)
endif
PROJ_bindir := $(PROJ_prefix)/bin
PROJ_libdir := $(PROJ_prefix)/lib
PROJ_datadir := $(PROJ_prefix)/share
PROJ_docsdir := $(PROJ_prefix)/docs/llvm
PROJ_etcdir := $(PROJ_prefix)/etc/llvm
PROJ_includedir := $(PROJ_prefix)/include
PROJ_infodir := $(PROJ_prefix)/info
PROJ_mandir := $(PROJ_prefix)/share/man
# Determine if we're on a unix type operating system
LLVM_ON_UNIX:=@LLVM_ON_UNIX@
LLVM_ON_WIN32:=@LLVM_ON_WIN32@
# Host operating system for which LLVM will be run.
OS=@OS@
HOST_OS=@HOST_OS@
# Target operating system for which LLVM will compile for.
TARGET_OS=@TARGET_OS@
# Host hardware architecture
HOST_ARCH=@HOST_ARCH@
# Target hardware architecture
ARCH=@ARCH@
TARGET_NATIVE_ARCH := $(ARCH)
LLVM_NATIVE_ARCH := @LLVM_NATIVE_ARCH@
# Indicates, whether we're cross-compiling LLVM or not
LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@
# Executable file extension for build platform (mainly for
# tablegen call if we're cross-compiling).
BUILD_EXEEXT=@BUILD_EXEEXT@
# Compilers for the build platflorm (mainly for tablegen
# call if we're cross-compiling).
BUILD_CC=@BUILD_CC@
BUILD_CXX=@BUILD_CXX@
# Triple for configuring build tools when cross-compiling
BUILD_TRIPLE=@build@
# Target triple (cpu-vendor-os) which LLVM is compiled for
HOST_TRIPLE=@host@
# Target triple (cpu-vendor-os) for which we should generate code
TARGET_TRIPLE=@target@
# Extra options to compile LLVM with
EXTRA_OPTIONS=@EXTRA_OPTIONS@
# Extra options to link LLVM with
EXTRA_LD_OPTIONS=@EXTRA_LD_OPTIONS@
# Endian-ness of the target
ENDIAN=@ENDIAN@
# Path to the C++ compiler to use. This is an optional setting, which defaults
# to whatever your gmake defaults to.
CXX = @CXX@
# Path to the CC binary, which use used by testcases for native builds.
CC := @CC@
# C/C++ preprocessor flags.
CPPFLAGS += @CPPFLAGS@
# C compiler flags.
CFLAGS += @CFLAGS@
# C++ compiler flags.
CXXFLAGS += @CXXFLAGS@
# Linker flags.
LDFLAGS += @LDFLAGS@
# Path to the library archiver program.
AR_PATH = @AR@
AR = @AR@
# Path to the nm program
NM_PATH = @NM@
# The pathnames of the programs we require to build
CMP := @CMP@
CP := @CP@
DATE := @DATE@
FIND := @FIND@
GREP := @GREP@
INSTALL := @INSTALL@
MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
MV := @MV@
RANLIB := @RANLIB@
RM := @RM@
SED := @SED@
TAR := @TAR@
PYTHON := @PYTHON@
# Paths to miscellaneous programs we hope are present but might not be
BZIP2 := @BZIP2@
CAT := @CAT@
DOT := @DOT@
DOXYGEN := @DOXYGEN@
GROFF := @GROFF@
GZIPBIN := @GZIPBIN@
GO := @GO@
OCAMLFIND := @OCAMLFIND@
GAS := @GAS@
POD2HTML := @POD2HTML@
POD2MAN := @POD2MAN@
PDFROFF := @PDFROFF@
ZIP := @ZIP@
HAVE_LIBZ := @HAVE_LIBZ@
HAVE_DLOPEN := @HAVE_DLOPEN@
HAVE_PTHREAD := @HAVE_PTHREAD@
HAVE_TERMINFO := @HAVE_TERMINFO@
HAVE_OCAMLOPT := @HAVE_OCAMLOPT@
HAVE_OCAML_OUNIT := @HAVE_OCAML_OUNIT@
LIBS := @LIBS@
# Targets that are possible to build
ALL_TARGETS := @ALL_TARGETS@
# Targets that we should build
TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
# Targets supporting JIT
TARGETS_WITH_JIT := @TARGETS_WITH_JIT@
# Path to directory where object files should be stored during a build.
# Set OBJ_ROOT to "." if you do not want to use a separate place for
# object files.
OBJ_ROOT := .
# What to pass as rpath flag to g++
RPATH := @RPATH@
# What to pass as -rdynamic flag to g++
RDYNAMIC := @RDYNAMIC@
# These are options that can either be enabled here, or can be enabled on the
# make command line (ie, make ENABLE_PROFILING=1):
# When ENABLE_LIBCPP is enabled, LLVM uses libc++ by default to build.
#ENABLE_LIBCPP = 0
ENABLE_LIBCPP = @ENABLE_LIBCPP@
# When ENABLE_CXX1Y is enabled, LLVM uses c++1y mode by default to build.
# Otherwise it uses the baseline c++11.
ENABLE_CXX1Y = @ENABLE_CXX1Y@
# When ENABLE_SPLIT_DWARF is enabled, LLVM uses -gfission to build in debug mode.
ENABLE_SPLIT_DWARF = @ENABLE_SPLIT_DWARF@
# When enabled, clang will have plugin support.
CLANG_PLUGIN_SUPPORT = @CLANG_PLUGIN_SUPPORT@
# When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool.
ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@
# When ENABLE_CLANG_STATIC_ANALYZER is enabled, clang will have StaticAnalyzer.
ENABLE_CLANG_STATIC_ANALYZER = @ENABLE_CLANG_STATIC_ANALYZER@
# When ENABLE_WERROR is enabled, we'll pass -Werror on the command line
ENABLE_WERROR = @ENABLE_WERROR@
# When ENABLE_TERMINFO is enabled, we use terminfo.
ENABLE_TERMINFO = @ENABLE_TERMINFO@
# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
# into the "Release" directories. Otherwise, LLVM code is not optimized and
# output is put in the "Debug" directories.
#ENABLE_OPTIMIZED = 1
@ENABLE_OPTIMIZED@
# When ENABLE_PROFILING is enabled, profile instrumentation is done
# and output is put into the "<Flavor>+Profile" directories, where
# <Flavor> is either Debug or Release depending on how other build
# flags are set. Otherwise, output is put in the <Flavor>
# directories.
#ENABLE_PROFILING = 1
@ENABLE_PROFILING@
# When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will
# exclude assertion checks, otherwise they are included.
#DISABLE_ASSERTIONS = 1
@DISABLE_ASSERTIONS@
# When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM
# code will include expensive checks, otherwise they are excluded.
#ENABLE_EXPENSIVE_CHECKS = 0
@ENABLE_EXPENSIVE_CHECKS@
# --enable-abi-breaking-checks : decide whether we should compile in asserts and
# checks that make the build ABI incompatible with an llvm built without these
# checks enabled.
ENABLE_ABI_BREAKING_CHECKS = @ENABLE_ABI_BREAKING_CHECKS@
# When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug
# symbols.
#DEBUG_RUNTIME = 1
@DEBUG_RUNTIME@
# When DEBUG_SYMBOLS is enabled, the compiler libraries will retain debug
# symbols.
#DEBUG_SYMBOLS = 1
@DEBUG_SYMBOLS@
# When KEEP_SYMBOLS is enabled, installed executables will never have their
# symbols stripped.
#KEEP_SYMBOLS = 1
@KEEP_SYMBOLS@
# The compiler flags to use for optimized builds.
OPTIMIZE_OPTION := @OPTIMIZE_OPTION@
# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
# information to allow gprof to be used to get execution frequencies.
#ENABLE_PROFILING = 1
# When ENABLE_DOCS is disabled, docs/ will not be built.
ENABLE_DOCS = @ENABLE_DOCS@
# When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
ENABLE_DOXYGEN = @ENABLE_DOXYGEN@
# Do we want to enable threads?
ENABLE_THREADS := @LLVM_ENABLE_THREADS@
# Do we want to enable zlib?
ENABLE_ZLIB := @LLVM_ENABLE_ZLIB@
# Do we want to build with position independent code?
ENABLE_PIC := @ENABLE_PIC@
# Do we want to build a shared library and link the tools with it?
ENABLE_SHARED := @ENABLE_SHARED@
# Do we want to link the stdc++ into a shared library? (Cygming)
ENABLE_EMBED_STDCXX := @ENABLE_EMBED_STDCXX@
# Use -fvisibility-inlines-hidden?
ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@
# Do we want to allow timestamping information into builds?
ENABLE_TIMESTAMPS := @ENABLE_TIMESTAMPS@
# This option tells the Makefiles to produce verbose output.
# It essentially prints the commands that make is executing
#VERBOSE = 1
# Enable JIT for this platform
TARGET_HAS_JIT = @TARGET_HAS_JIT@
# Shared library extension for host platform.
SHLIBEXT = @SHLIBEXT@
# Executable file extension for host platform.
EXEEXT = @EXEEXT@
# Things we just assume are "there"
ECHO := echo
# Get the options for causing archives to link all their content instead of
# just missing symbols, and the inverse of that. This is used for certain LLVM
# tools that permit loadable modules. It ensures that the LLVM symbols will be
# available to those loadable modules.
LINKALL := @LINKALL@
NOLINKALL := @NOLINKALL@
# Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending
# on the check.
HUGE_VAL_SANITY = @HUGE_VAL_SANITY@
# Bindings that we should build
BINDINGS_TO_BUILD := @BINDINGS_TO_BUILD@
OCAML_LIBDIR := @OCAML_LIBDIR@
# When compiling under Mingw/Cygwin, executables such as tblgen
# expect Windows paths, whereas the build system uses Unix paths.
# The function SYSPATH transforms Unix paths into Windows paths.
ifneq (,$(findstring -mno-cygwin, $(CXX)))
SYSPATH = $(shell echo $(1) | cygpath -m -f -)
else
SYSPATH = $(1)
endif
# Location of the plugin header file for gold.
BINUTILS_INCDIR := @BINUTILS_INCDIR@
# Optional flags supported by the compiler
# -Wmissing-field-initializers
MISSING_FIELD_INITIALIZERS = @MISSING_FIELD_INITIALIZERS@
# -Wno-variadic-macros
NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@
# -Wcovered-switch-default
COVERED_SWITCH_DEFAULT = @COVERED_SWITCH_DEFAULT@
# -Wno-uninitialized
NO_UNINITIALIZED = @NO_UNINITIALIZED@
# -Wno-maybe-uninitialized
NO_MAYBE_UNINITIALIZED = @NO_MAYBE_UNINITIALIZED@
# -Wno-comment
NO_COMMENT = @NO_COMMENT@
# Was polly found in tools/polly?
LLVM_HAS_POLLY = @LLVM_HAS_POLLY@
# Flags supported by the linker.
# bfd ld / gold --version-script=file
HAVE_LINK_VERSION_SCRIPT = @HAVE_LINK_VERSION_SCRIPT@
# Flags to control using libxml2
LIBXML2_LIBS := @LIBXML2_LIBS@
LIBXML2_INC := @LIBXML2_INC@
# Flags to control building support for Intel JIT Events API
USE_INTEL_JITEVENTS := @USE_INTEL_JITEVENTS@
INTEL_JITEVENTS_INCDIR := @INTEL_JITEVENTS_INCDIR@
INTEL_JITEVENTS_LIBDIR := @INTEL_JITEVENTS_LIBDIR@
# Flags to control building support for OProfile JIT API
USE_OPROFILE := @USE_OPROFILE@
ifeq ($(USE_INTEL_JITEVENTS), 1)
OPTIONAL_COMPONENTS += IntelJITEvents
endif
ifeq ($(USE_OPROFILE), 1)
OPTIONAL_COMPONENTS += OProfileJIT
endif

File diff suppressed because it is too large Load Diff

View File

@ -1,54 +0,0 @@
#!/bin/bash
die() {
echo "$@" 1>&2
exit 1
}
clean() {
echo $1 | sed -e 's/\\//g'
}
### NOTE: ############################################################
### These variables specify the tool versions we want to use.
### Periods should be escaped with backslash for use by grep.
###
### If you update these, please also update docs/GettingStarted.rst
want_autoconf_version='2\.60'
want_autoheader_version=$want_autoconf_version
want_aclocal_version='1\.9\.6'
### END NOTE #########################################################
outfile=configure
configfile=configure.ac
want_autoconf_version_clean=$(clean $want_autoconf_version)
want_autoheader_version_clean=$(clean $want_autoheader_version)
want_aclocal_version_clean=$(clean $want_aclocal_version)
test -d autoconf && test -f autoconf/$configfile && cd autoconf
test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first"
autoconf --version | grep $want_autoconf_version > /dev/null
test $? -eq 0 || die "Your autoconf was not detected as being $want_autoconf_version_clean"
aclocal --version | grep '^aclocal.*'$want_aclocal_version > /dev/null
test $? -eq 0 || die "Your aclocal was not detected as being $want_aclocal_version_clean"
autoheader --version | grep '^autoheader.*'$want_autoheader_version > /dev/null
test $? -eq 0 || die "Your autoheader was not detected as being $want_autoheader_version_clean"
echo ""
echo "### NOTE: ############################################################"
echo "### If you get *any* warnings from autoconf below you MUST fix the"
echo "### scripts in the m4 directory because there are future forward"
echo "### compatibility or platform support issues at risk. Please do NOT"
echo "### commit any configure script that was generated with warnings"
echo "### present. You should get just three 'Regenerating..' lines."
echo "######################################################################"
echo ""
echo "Regenerating aclocal.m4 with aclocal $want_aclocal_version_clean"
cwd=`pwd`
aclocal --force -I $cwd/m4 || die "aclocal failed"
echo "Regenerating configure with autoconf $want_autoconf_version_clean"
autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed"
cd ..
echo "Regenerating config.h.in with autoheader $want_autoheader_version_clean"
autoheader --warnings=all -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed"
exit 0

View File

@ -1,7 +0,0 @@
{
global: main;
__progname;
environ;
local: *;
};

View File

@ -1,24 +0,0 @@
------------------------------------------------------------------------------
Autoconf Files
------------------------------------------------------------------------------
All autoconf files are licensed under the LLVM license with the following
additions:
llvm/autoconf/install-sh:
This script is licensed under the LLVM license, with the following
additional copyrights and restrictions:
Copyright 1991 by the Massachusetts Institute of Technology
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission. M.I.T. makes no representations about the
suitability of this software for any purpose. It is provided "as is"
without express or implied warranty.
Please see the source files for additional copyrights.

View File

@ -1,14 +0,0 @@
Upgrading autoconf
===============================================================================
If you are in the mood to upgrade autoconf, you should:
1. Consider not upgrading.
2. No really, this is a hassle, you don't want to do it.
3. Get the new version of autoconf and put it in <SRC>
4. configure/build/install autoconf with --prefix=<PFX>
5. Run autoupdate on all the m4 macros in llvm/autoconf/m4
6. Run autoupdate on llvm/autoconf/configure.ac
7. Regenerate configure script with AutoRegen.sh
8. If there are any warnings from AutoRegen.sh, fix them and go to step 7.
9. Test, test, test.

1770
autoconf/config.sub vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,322 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2004-09-10.20
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit 0;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit 0;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,42 +0,0 @@
# Check for the extension used for executables on build platform.
# This is necessary for cross-compiling where the build platform
# may differ from the host platform.
AC_DEFUN([AC_BUILD_EXEEXT],
[
AC_MSG_CHECKING([for executable suffix on build platform])
AC_CACHE_VAL(ac_cv_build_exeext,
[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
ac_cv_build_exeext=.exe
else
ac_build_prefix=${build_alias}-
AC_CHECK_PROG(BUILD_CC, ${ac_build_prefix}gcc, ${ac_build_prefix}gcc)
if test -z "$BUILD_CC"; then
AC_CHECK_PROG(BUILD_CC, gcc, gcc)
if test -z "$BUILD_CC"; then
AC_CHECK_PROG(BUILD_CC, cc, cc, , , /usr/ucb/cc)
fi
fi
test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD'
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_build_exeext=
if AC_TRY_EVAL(ac_build_link); then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.dSYM) ;;
*) ac_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
else
AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.])
fi
rm -f conftest*
test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank
fi])
BUILD_EXEEXT=""
test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext}
AC_MSG_RESULT(${ac_cv_build_exeext})
ac_build_exeext=$BUILD_EXEEXT
AC_SUBST(BUILD_EXEEXT)])

View File

@ -1,31 +0,0 @@
#
# Determine if the printf() functions have the %a format character.
# This is modified from:
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
AC_DEFUN([AC_C_PRINTF_A],
[AC_CACHE_CHECK([if printf has the %a format character],[llvm_cv_c_printf_a],
[AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <stdio.h>
#include <stdlib.h>
]],[[
volatile double A, B;
char Buffer[100];
A = 1;
A /= 10.0;
sprintf(Buffer, "%a", A);
B = atof(Buffer);
if (A != B)
return (1);
if (A != 0x1.999999999999ap-4)
return (1);
return (0);]])],
llvm_cv_c_printf_a=yes,
llvmac_cv_c_printf_a=no,
llvmac_cv_c_printf_a=no)
AC_LANG_POP([C])])
if test "$llvm_cv_c_printf_a" = "yes"; then
AC_DEFINE([HAVE_PRINTF_A],[1],[Define to have the %a format string])
fi
])

View File

@ -1,26 +0,0 @@
#
# Check for GNU Make. This is originally from
# http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html
#
AC_DEFUN([AC_CHECK_GNU_MAKE],
[AC_CACHE_CHECK([for GNU make],[llvm_cv_gnu_make_command],
dnl Search all the common names for GNU make
[llvm_cv_gnu_make_command=''
for a in "$MAKE" make gmake gnumake ; do
if test -z "$a" ; then continue ; fi ;
if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null )
then
llvm_cv_gnu_make_command=$a ;
break;
fi
done])
dnl If there was a GNU version, then set @ifGNUmake@ to the empty string,
dnl '#' otherwise
if test "x$llvm_cv_gnu_make_command" != "x" ; then
ifGNUmake='' ;
else
ifGNUmake='#' ;
AC_MSG_RESULT("Not found");
fi
AC_SUBST(ifGNUmake)
])

View File

@ -1,9 +0,0 @@
#
# Configure a Makefile without clobbering it if it exists and is not out of
# date. This macro is unique to LLVM.
#
AC_DEFUN([AC_CONFIG_MAKEFILE],
[AC_CONFIG_COMMANDS($1,
[${llvm_src}/autoconf/mkinstalldirs `dirname $1`
${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/$1 $1])
])

View File

@ -1,14 +0,0 @@
#
# Provide the arguments and other processing needed for an LLVM project
#
AC_DEFUN([LLVM_CONFIG_PROJECT],
[AC_ARG_WITH([llvmsrc],
AS_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]),
[llvm_src="$withval"],[llvm_src="]$1["])
AC_SUBST(LLVM_SRC,$llvm_src)
AC_ARG_WITH([llvmobj],
AS_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),
[llvm_obj="$withval"],[llvm_obj="]$2["])
AC_SUBST(LLVM_OBJ,$llvm_obj)
AC_CONFIG_COMMANDS([setup],,[llvm_src="${LLVM_SRC}"])
])

View File

@ -1,2 +0,0 @@
AC_DEFUN([CXX_FLAG_CHECK],
[AC_SUBST($1, `$CXX -Werror patsubst($2, [^-Wno-], [-W]) -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)])

View File

@ -1,5 +0,0 @@
# Combine AC_DEFINE and AC_SUBST
AC_DEFUN([LLVM_DEFINE_SUBST], [
AC_DEFINE([$1], [$2], [$3])
AC_SUBST([$1], ['$2'])
])

View File

@ -1,118 +0,0 @@
dnl Check for a standard program that has a bin, include and lib directory
dnl
dnl Parameters:
dnl $1 - prefix directory to check
dnl $2 - program name to check
dnl $3 - header file to check
dnl $4 - library file to check
AC_DEFUN([CHECK_STD_PROGRAM],
[m4_define([allcapsname],translit($2,a-z,A-Z))
if test -n "$1" -a -d "$1" -a -n "$2" -a -d "$1/bin" -a -x "$1/bin/$2" ; then
AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"])
AC_SUBST(allcapsname(),[$1/bin/$2])
AC_SUBST(allcapsname()[_BIN],[$1/bin])
AC_SUBST(allcapsname()[_DIR],[$1])
if test -n "$3" -a -d "$1/include" -a -f "$1/include/$3" ; then
AC_SUBST(allcapsname()[_INC],[$1/include])
fi
if test -n "$4" -a -d "$1/lib" -a -f "$1/lib/$4" ; then
AC_SUBST(allcapsname()[_LIB],[$1/lib])
fi
fi
])
dnl Find a program via --with options, in the path, or well known places
dnl
dnl Parameters:
dnl $1 - program's executable name
dnl $2 - header file name to check (optional)
dnl $3 - library file name to check (optional)
dnl $4 - alternate (long) name for the program
AC_DEFUN([FIND_STD_PROGRAM],
[m4_define([allcapsname],translit($1,a-z,A-Z))
m4_define([stdprog_long_name],ifelse($4,,translit($1,[ !@#$%^&*()-+={}[]:;"',./?],[-]),translit($4,[ !@#$%^&*()-+={}[]:;"',./?],[-])))
AC_MSG_CHECKING([for ]stdprog_long_name()[ bin/lib/include locations])
AC_ARG_WITH($1,
AS_HELP_STRING([--with-]stdprog_long_name()[=DIR],
[Specify that the ]stdprog_long_name()[ install prefix is DIR]),
$1[pfxdir=$withval],$1[pfxdir=nada])
AC_ARG_WITH($1[-bin],
AS_HELP_STRING([--with-]stdprog_long_name()[-bin=DIR],
[Specify that the ]stdprog_long_name()[ binary is in DIR]),
$1[bindir=$withval],$1[bindir=nada])
AC_ARG_WITH($1[-lib],
AS_HELP_STRING([--with-]stdprog_long_name()[-lib=DIR],
[Specify that ]stdprog_long_name()[ libraries are in DIR]),
$1[libdir=$withval],$1[libdir=nada])
AC_ARG_WITH($1[-inc],
AS_HELP_STRING([--with-]stdprog_long_name()[-inc=DIR],
[Specify that the ]stdprog_long_name()[ includes are in DIR]),
$1[incdir=$withval],$1[incdir=nada])
eval pfxval=\$\{$1pfxdir\}
eval binval=\$\{$1bindir\}
eval incval=\$\{$1incdir\}
eval libval=\$\{$1libdir\}
if test "${pfxval}" != "nada" ; then
CHECK_STD_PROGRAM(${pfxval},$1,$2,$3)
elif test "${binval}" != "nada" ; then
if test "${libval}" != "nada" ; then
if test "${incval}" != "nada" ; then
if test -d "${binval}" ; then
if test -d "${incval}" ; then
if test -d "${libval}" ; then
AC_SUBST(allcapsname(),${binval}/$1)
AC_SUBST(allcapsname()[_BIN],${binval})
AC_SUBST(allcapsname()[_INC],${incval})
AC_SUBST(allcapsname()[_LIB],${libval})
AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"])
AC_MSG_RESULT([found via --with options])
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-libdir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-incdir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-bindir value must be a directory])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-incdir option must be specified])
fi
else
AC_MSG_RESULT([failed])
AC_MSG_ERROR([The --with-]$1[-libdir option must be specified])
fi
else
tmppfxdir=`which $1 2>&1`
if test -n "$tmppfxdir" -a -d "${tmppfxdir%*$1}" -a \
-d "${tmppfxdir%*$1}/.." ; then
tmppfxdir=`cd "${tmppfxdir%*$1}/.." ; pwd`
CHECK_STD_PROGRAM($tmppfxdir,$1,$2,$3)
AC_MSG_RESULT([found in PATH at ]$tmppfxdir)
else
checkresult="yes"
eval checkval=\$\{"USE_"allcapsname()\}
CHECK_STD_PROGRAM([/usr],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/usr/local],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/sw],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/opt],$1,$2,$3)
if test -z "${checkval}" ; then
CHECK_STD_PROGRAM([/],$1,$2,$3)
if test -z "${checkval}" ; then
checkresult="no"
fi
fi
fi
fi
fi
AC_MSG_RESULT($checkresult)
fi
fi
])

View File

@ -1,26 +0,0 @@
#
# Check for the ability to mmap a file.
#
AC_DEFUN([AC_FUNC_MMAP_FILE],
[AC_CACHE_CHECK(for mmap of files,
ac_cv_func_mmap_file,
[ AC_LANG_PUSH([C])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
]],[[
int fd;
fd = creat ("foo",0777);
fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0);
unlink ("foo");
return (fd != (int) MAP_FAILED);]])],
[ac_cv_func_mmap_file=yes],[ac_cv_func_mmap_file=no],[ac_cv_func_mmap_file=no])
AC_LANG_POP([C])
])
if test "$ac_cv_func_mmap_file" = yes; then
AC_DEFINE([HAVE_MMAP_FILE],[],[Define if mmap() can map files into memory])
AC_SUBST(MMAP_FILE,[yes])
fi
])

View File

@ -1,21 +0,0 @@
#
# Check for anonymous mmap macros. This is modified from
# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html
#
AC_DEFUN([AC_HEADER_MMAP_ANONYMOUS],
[AC_CACHE_CHECK(for MAP_ANONYMOUS vs. MAP_ANON,
ac_cv_header_mmap_anon,
[ AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>]],
[[mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0);]])],
ac_cv_header_mmap_anon=yes,
ac_cv_header_mmap_anon=no)
AC_LANG_POP([C])
])
if test "$ac_cv_header_mmap_anon" = yes; then
AC_DEFINE([HAVE_MMAP_ANONYMOUS],[1],[Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if it uses MAP_ANON])
fi
])

View File

@ -1,18 +0,0 @@
#
# This function determins if the HUGE_VAL macro is compilable with the
# -pedantic switch or not. XCode < 2.4.1 doesn't get it right.
#
AC_DEFUN([AC_HUGE_VAL_CHECK],[
AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[
AC_LANG_PUSH([C++])
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -pedantic"
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]],
[[double x = HUGE_VAL; return x != x;]])],
[ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no],
[ac_cv_huge_val_sanity=yes])
CXXFLAGS=$ac_save_CXXFLAGS
AC_LANG_POP([C++])
])
AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity)
])

View File

@ -1,109 +0,0 @@
#
# Get the linker version string.
#
# This macro is specific to LLVM.
#
AC_DEFUN([AC_LINK_GET_VERSION],
[AC_CACHE_CHECK([for linker version],[llvm_cv_link_version],
[
version_string="$(${LD:-ld} -v 2>&1 | head -1)"
# Check for ld64.
if (echo "$version_string" | grep -q "ld64"); then
llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\{0,1\}#\1#")
else
llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#")
fi
])
AC_DEFINE_UNQUOTED([HOST_LINK_VERSION],"$llvm_cv_link_version",
[Linker version detected at compile time.])
])
#
# Determine if the system can handle the -R option being passed to the linker.
#
# This macro is specific to LLVM.
#
AC_DEFUN([AC_LINK_USE_R],
[AC_CACHE_CHECK([for compiler -Wl,-R<path> option],[llvm_cv_link_use_r],
[ AC_LANG_PUSH([C])
oldcflags="$CFLAGS"
CFLAGS="$CFLAGS -Wl,-R."
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[llvm_cv_link_use_r=yes],[llvm_cv_link_use_r=no])
CFLAGS="$oldcflags"
AC_LANG_POP([C])
])
if test "$llvm_cv_link_use_r" = yes ; then
AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.])
fi
])
#
# Determine if the system can handle the -rdynamic option being passed
# to the compiler.
#
# This macro is specific to LLVM.
#
AC_DEFUN([AC_LINK_EXPORT_DYNAMIC],
[AC_CACHE_CHECK([for compiler -rdynamic option],
[llvm_cv_link_use_export_dynamic],
[ AC_LANG_PUSH([C])
oldcflags="$CFLAGS"
CFLAGS="$CFLAGS -rdynamic"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[llvm_cv_link_use_export_dynamic=yes],[llvm_cv_link_use_export_dynamic=no])
CFLAGS="$oldcflags"
AC_LANG_POP([C])
])
if test "$llvm_cv_link_use_export_dynamic" = yes ; then
AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use -rdynamic.])
fi
])
#
# Determine if the system can handle the --version-script option being
# passed to the linker.
#
# This macro is specific to LLVM.
#
AC_DEFUN([AC_LINK_VERSION_SCRIPT],
[AC_CACHE_CHECK([for compiler -Wl,--version-script option],
[llvm_cv_link_use_version_script],
[ AC_LANG_PUSH([C])
oldcflags="$CFLAGS"
# The following code is from the autoconf manual,
# "11.13: Limitations of Usual Tools".
# Create a temporary directory $tmp in $TMPDIR (default /tmp).
# Use mktemp if possible; otherwise fall back on mkdir,
# with $RANDOM to make collisions less likely.
: ${TMPDIR=/tmp}
{
tmp=`
(umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
` &&
test -n "$tmp" && test -d "$tmp"
} || {
tmp=$TMPDIR/foo$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || exit $?
echo "{" > "$tmp/export.map"
echo " global: main;" >> "$tmp/export.map"
echo " local: *;" >> "$tmp/export.map"
echo "};" >> "$tmp/export.map"
CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[llvm_cv_link_use_version_script=yes],[llvm_cv_link_use_version_script=no])
rm "$tmp/export.map"
rmdir "$tmp"
CFLAGS="$oldcflags"
AC_LANG_POP([C])
])
if test "$llvm_cv_link_use_version_script" = yes ; then
AC_SUBST(HAVE_LINK_VERSION_SCRIPT,1)
fi
])

View File

@ -1,17 +0,0 @@
#
# Some Linux machines run a 64-bit kernel with a 32-bit userspace. 'uname -m'
# shows these as x86_64. Ask the system 'gcc' what it thinks.
#
AC_DEFUN([AC_IS_LINUX_MIXED],
[AC_CACHE_CHECK(for 32-bit userspace on 64-bit system,llvm_cv_linux_mixed,
[ AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#ifndef __x86_64__
error: Not x86-64 even if uname says so!
#endif
]])],
[llvm_cv_linux_mixed=no],
[llvm_cv_linux_mixed=yes])
AC_LANG_POP([C])
])
])

View File

@ -1,17 +0,0 @@
#
# When allocating RWX memory, check whether we need to use /dev/zero
# as the file descriptor or not.
#
AC_DEFUN([AC_NEED_DEV_ZERO_FOR_MMAP],
[AC_CACHE_CHECK([if /dev/zero is needed for mmap],
ac_cv_need_dev_zero_for_mmap,
[if test "$llvm_cv_os_type" = "Interix" ; then
ac_cv_need_dev_zero_for_mmap=yes
else
ac_cv_need_dev_zero_for_mmap=no
fi
])
if test "$ac_cv_need_dev_zero_for_mmap" = yes; then
AC_DEFINE([NEED_DEV_ZERO_FOR_MMAP],[1],
[Define if /dev/zero should be used when mapping RWX memory, or undefine if its not necessary])
fi])

View File

@ -1,31 +0,0 @@
dnl Check a program for version sanity. The test runs a program, passes it an
dnl argument to make it print out some identification string, and filters that
dnl output with a regular expression. If the output is non-empty, the program
dnl passes the sanity check.
dnl $1 - Name or full path of the program to run
dnl $2 - Argument to pass to print out identification string
dnl $3 - grep RE to match identification string
dnl $4 - set to 1 to make errors only a warning
AC_DEFUN([CHECK_PROGRAM_SANITY],
[
AC_MSG_CHECKING([sanity for program ]$1)
sanity="0"
sanity_path=`which $1 2>/dev/null`
if test "$?" -eq 0 -a -x "$sanity_path" ; then
sanity=`$1 $2 2>&1 | grep "$3"`
if test -z "$sanity" ; then
AC_MSG_RESULT([no])
sanity="0"
if test "$4" -eq 1 ; then
AC_MSG_WARN([Program ]$1[ failed to pass sanity check.])
else
AC_MSG_ERROR([Program ]$1[ failed to pass sanity check.])
fi
else
AC_MSG_RESULT([yes])
sanity="1"
fi
else
AC_MSG_RESULT([not found])
fi
])

View File

@ -1,16 +0,0 @@
dnl
dnl AC_SINGLE_CXX_CHECK(CACHEVAR, FUNCTION, HEADER, PROGRAM)
dnl $1, $2, $3, $4,
AC_DEFUN([AC_SINGLE_CXX_CHECK],
[
AC_CACHE_CHECK([for $2 in $3], [$1],
[
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]][$3], [$4])],
[$1][[=yes]],
[$1][[=no]])
AC_LANG_POP([C++])
])
])

View File

@ -1,24 +0,0 @@
#
# Determine if the compiler accepts -fvisibility-inlines-hidden
#
# This macro is specific to LLVM.
#
AC_DEFUN([AC_CXX_USE_VISIBILITY_INLINES_HIDDEN],
[AC_CACHE_CHECK([for compiler -fvisibility-inlines-hidden option],
[llvm_cv_cxx_visibility_inlines_hidden],
[ AC_LANG_PUSH([C++])
oldcxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -O0 -fvisibility-inlines-hidden -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[template <typename T> struct X { void __attribute__((noinline)) f() {} };],
[X<int>().f();])],
[llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no])
CXXFLAGS="$oldcxxflags"
AC_LANG_POP([C++])
])
if test "$llvm_cv_cxx_visibility_inlines_hidden" = yes ; then
AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[1])
else
AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[0])
fi
])

View File

@ -1,353 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2004-09-07.08
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit 0
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit 0
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,150 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2004-02-15.20
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
# echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
# echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
# echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,20 +0,0 @@
##===- bindings/Makefile -----------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL := ..
include $(LEVEL)/Makefile.config
PARALLEL_DIRS =
ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD)))
PARALLEL_DIRS += ocaml
endif
include $(LEVEL)/Makefile.common

View File

@ -1,20 +0,0 @@
##===- bindings/ocaml/Makefile -----------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL := ../..
DIRS = llvm bitreader bitwriter irreader analysis target executionengine \
transforms linker backends all_backends
ExtraMakefiles = $(PROJ_OBJ_DIR)/Makefile.ocaml
ocamldoc:
$(Verb) for i in $(DIRS) ; do \
$(MAKE) -C $$i ocamldoc; \
done
include $(LEVEL)/Makefile.common

View File

@ -1,483 +0,0 @@
##===- bindings/ocaml/Makefile.ocaml -----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# An OCaml library is a unique project type in the context of LLVM, so rules are
# here rather than in Makefile.rules.
#
# Reference materials on installing OCaml libraries:
#
# https://fedoraproject.org/wiki/Packaging/OCaml
# http://pkg-ocaml-maint.alioth.debian.org/ocaml_packaging_policy.txt
#
##===----------------------------------------------------------------------===##
include $(LEVEL)/Makefile.config
# We have our own rules for building static libraries.
NO_BUILD_ARCHIVE = 1
# CFLAGS needs to be set before Makefile.rules is included.
CXX.Flags += -I"$(shell $(OCAMLFIND) c -where)"
C.Flags += -I"$(shell $(OCAMLFIND) c -where)"
ifeq ($(ENABLE_SHARED),1)
LINK_COMPONENTS := all
endif
include $(LEVEL)/Makefile.common
# Used in out-of-tree builds of OCaml bindings only.
ifdef SYSTEM_LLVM_CONFIG
LLVM_CONFIG = $(SYSTEM_LLVM_CONFIG)
LLVMLibsOptions += $(shell $(LLVM_CONFIG) --ldflags)
endif
# Intentionally ignore PROJ_prefix here. We want the ocaml stdlib. However, the
# user can override this with OCAML_LIBDIR or configure --with-ocaml-libdir=.
PROJ_libocamldir := $(DESTDIR)$(OCAML_LIBDIR)
OcamlDir := $(LibDir)/ocaml
# Info from llvm-config and similar
ifndef IS_CLEANING_TARGET
ifdef UsedComponents
UsedLibs = $(shell $(LLVM_CONFIG) --libs --system-libs $(UsedComponents))
UsedLibNames = $(shell $(LLVM_CONFIG) --libnames $(UsedComponents))
endif
endif
# How do we link OCaml executables with LLVM?
# 1) If this is a --enable-shared build, build stub libraries. This also allows
# to use LLVM from toplevels.
# 2) If this is a --disable-shared build, embed ocamlc options for building
# a custom runtime and a static executable. It is not possible to use LLVM
# from toplevels.
ifneq ($(ObjectsO),)
ifeq ($(ENABLE_SHARED),1)
OCAMLSTUBS := 1
OCAMLSTUBFLAGS := $(patsubst %,-cclib %, $(LLVMLibsOptions) -l$(LIBRARYNAME))
endif
endif
# Avoid the need for LD_LIBRARY_PATH
ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
ifneq ($(HOST_OS),Darwin)
OCAMLRPATH := $(RPATH) -Wl,'$$ORIGIN/../../lib'
endif
endif
# See http://caml.inria.fr/mantis/view.php?id=6642
OCAMLORIGIN := -ccopt -L'$$CAMLORIGIN/..' \
-ccopt $(RPATH) -ccopt -Wl,'$$CAMLORIGIN/..'
# Tools
OCAMLCFLAGS += -I $(OcamlDir) $(addprefix -package ,$(FindlibPackages))
ifndef IS_CLEANING_TARGET
ifneq ($(ObjectsO),)
OCAMLAFLAGS += $(patsubst %,-cclib %, \
$(filter-out -L$(LibDir),-l$(LIBRARYNAME) \
$(shell $(LLVM_CONFIG) --ldflags)) \
$(UsedLibs) $(ExtraLibs))
else
OCAMLAFLAGS += $(patsubst %,-cclib %, \
$(filter-out -L$(LibDir),$(shell $(LLVM_CONFIG) --ldflags)) \
$(UsedLibs) $(ExtraLibs))
endif
endif
ifneq ($(DEBUG_SYMBOLS),1)
OCAMLDEBUGFLAG := -g
endif
Compile.CMI := $(strip $(OCAMLFIND) c -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o)
Compile.CMO := $(strip $(OCAMLFIND) c -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o)
Compile.CMX := $(strip $(OCAMLFIND) opt -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o)
ifdef OCAMLSTUBS
# -dllib is engaged with ocamlc builds, $(OCAMLSTUBFLAGS) in ocamlc -custom builds.
Archive.CMA := $(strip $(OCAMLFIND) c -a -dllib -l$(LIBRARYNAME) $(OCAMLSTUBFLAGS) \
$(OCAMLDEBUGFLAG) $(OCAMLORIGIN) -o)
else
Archive.CMA := $(strip $(OCAMLFIND) c -a -custom $(OCAMLAFLAGS) $(OCAMLDEBUGFLAG) \
$(OCAMLORIGIN) -o)
endif
ifdef OCAMLSTUBS
Archive.CMXA := $(strip $(OCAMLFIND) opt -a $(OCAMLSTUBFLAGS) $(OCAMLDEBUGFLAG) \
$(OCAMLORIGIN) -o)
else
Archive.CMXA := $(strip $(OCAMLFIND) opt -a $(OCAMLAFLAGS) $(OCAMLDEBUGFLAG) \
$(OCAMLORIGIN) -o)
endif
# Source files
ifndef OcamlSources1
OcamlSources1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.ml))
endif
ifndef OcamlHeaders1
OcamlHeaders1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.mli))
endif
OcamlSources2 := $(filter-out $(ExcludeSources),$(OcamlSources1))
OcamlHeaders2 := $(filter-out $(ExcludeHeaders),$(OcamlHeaders1))
OcamlSources := $(OcamlSources2:$(PROJ_SRC_DIR)/%=$(ObjDir)/%)
OcamlHeaders := $(OcamlHeaders2:$(PROJ_SRC_DIR)/%=$(ObjDir)/%)
# Intermediate files
ObjectsCMI := $(OcamlSources:%.ml=%.cmi)
ObjectsCMO := $(OcamlSources:%.ml=%.cmo)
ObjectsCMX := $(OcamlSources:%.ml=%.cmx)
ifdef LIBRARYNAME
LibraryCMA := $(ObjDir)/$(LIBRARYNAME).cma
LibraryCMXA := $(ObjDir)/$(LIBRARYNAME).cmxa
endif
ifdef TOOLNAME
ToolEXE := $(ObjDir)/$(TOOLNAME)$(EXEEXT)
endif
# Output files
# The .cmo files are the only intermediates; all others are to be installed.
OutputsCMI := $(ObjectsCMI:$(ObjDir)/%.cmi=$(OcamlDir)/%.cmi)
OutputsCMX := $(ObjectsCMX:$(ObjDir)/%.cmx=$(OcamlDir)/%.cmx)
OutputLibs := $(UsedLibNames:%=$(OcamlDir)/%)
ifdef LIBRARYNAME
LibraryA := $(OcamlDir)/lib$(LIBRARYNAME).a
OutputCMA := $(LibraryCMA:$(ObjDir)/%.cma=$(OcamlDir)/%.cma)
OutputCMXA := $(LibraryCMXA:$(ObjDir)/%.cmxa=$(OcamlDir)/%.cmxa)
endif
ifdef OCAMLSTUBS
SharedLib := $(OcamlDir)/dll$(LIBRARYNAME)$(SHLIBEXT)
endif
ifdef TOOLNAME
ifdef EXAMPLE_TOOL
OutputEXE := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT)
else
OutputEXE := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT)
endif
endif
# Installation targets
DestLibs := $(UsedLibNames:%=$(PROJ_libocamldir)/%)
ifdef LIBRARYNAME
DestA := $(PROJ_libocamldir)/lib$(LIBRARYNAME).a
DestCMA := $(PROJ_libocamldir)/$(LIBRARYNAME).cma
DestCMXA := $(PROJ_libocamldir)/$(LIBRARYNAME).cmxa
endif
ifdef OCAMLSTUBS
DestSharedLib := $(PROJ_libocamldir)/dll$(LIBRARYNAME)$(SHLIBEXT)
endif
##===- Dependencies -------------------------------------------------------===##
# Copy the sources into the intermediate directory because older ocamlc doesn't
# support -o except when linking (outputs are placed next to inputs).
$(ObjDir)/%.mli: $(PROJ_SRC_DIR)/%.mli $(ObjDir)/.dir
$(Verb) $(CP) -f $< $@
$(ObjDir)/%.ml: $(PROJ_SRC_DIR)/%.ml $(ObjDir)/.dir
$(Verb) $(CP) -f $< $@
$(ObjectsCMI): $(UsedOcamlInterfaces:%=$(OcamlDir)/%.cmi)
ifdef LIBRARYNAME
$(ObjDir)/$(LIBRARYNAME).ocamldep: $(OcamlSources) $(OcamlHeaders) \
$(OcamlDir)/.dir $(ObjDir)/.dir
$(Verb) $(OCAMLFIND) dep $(OCAMLCFLAGS) $(OcamlSources) $(OcamlHeaders) > $@
-include $(ObjDir)/$(LIBRARYNAME).ocamldep
endif
ifdef TOOLNAME
$(ObjDir)/$(TOOLNAME).ocamldep: $(OcamlSources) $(OcamlHeaders) \
$(OcamlDir)/.dir $(ObjDir)/.dir
$(Verb) $(OCAMLFIND) dep $(OCAMLCFLAGS) $(OcamlSources) $(OcamlHeaders) > $@
-include $(ObjDir)/$(TOOLNAME).ocamldep
endif
##===- Build static library from C sources --------------------------------===##
ifdef LibraryA
all-local:: $(LibraryA)
clean-local:: clean-a
install-local:: install-a
uninstall-local:: uninstall-a
$(LibraryA): $(ObjectsO) $(OcamlDir)/.dir
$(Echo) "Building $(BuildMode) $(notdir $@)"
-$(Verb) $(RM) -f $@
$(Verb) $(Archive) $@ $(ObjectsO)
$(Verb) $(Ranlib) $@
clean-a::
-$(Verb) $(RM) -f $(LibraryA)
install-a:: $(LibraryA)
$(Echo) "Installing $(BuildMode) $(DestA)"
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) $(INSTALL) $(LibraryA) $(DestA)
$(Verb)
uninstall-a::
$(Echo) "Uninstalling $(DestA)"
-$(Verb) $(RM) -f $(DestA)
endif
##===- Build stub library from C sources ----------------------------------===##
ifdef SharedLib
all-local:: $(SharedLib)
clean-local:: clean-shared
install-local:: install-shared
uninstall-local:: uninstall-shared
$(SharedLib): $(ObjectsO) $(OcamlDir)/.dir
$(Echo) "Building $(BuildMode) $(notdir $@)"
$(Verb) $(Link) $(SharedLinkOptions) $(OCAMLRPATH) -o $@ $(ObjectsO) \
$(LLVMLibsOptions)
clean-shared::
-$(Verb) $(RM) -f $(SharedLib)
install-shared:: $(SharedLib)
$(Echo) "Installing $(BuildMode) $(DestSharedLib)"
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) $(INSTALL) $(SharedLib) $(DestSharedLib)
$(Verb)
uninstall-shared::
$(Echo) "Uninstalling $(DestSharedLib)"
-$(Verb) $(RM) -f $(DestSharedLib)
endif
##===- Deposit dependent libraries adjacent to OCaml libs -----------------===##
ifndef SYSTEM_LLVM_CONFIG
all-local:: build-deplibs
clean-local:: clean-deplibs
install-local:: install-deplibs
uninstall-local:: uninstall-deplibs
build-deplibs: $(OutputLibs)
$(OcamlDir)/%.so: $(LibDir)/%.so
$(Verb) ln -sf $< $@
$(OcamlDir)/%.a: $(LibDir)/%.a
$(Verb) ln -sf $< $@
$(OcamlDir)/%.o: $(LibDir)/%.o
$(Verb) ln -sf $< $@
clean-deplibs:
$(Verb) $(RM) -f $(OutputLibs)
install-deplibs:
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) for i in $(DestLibs:$(PROJ_libocamldir)/%=%); do \
ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \
done
uninstall-deplibs:
$(Verb) $(RM) -f $(DestLibs)
endif
##===- Build ocaml interfaces (.mli's -> .cmi's) --------------------------===##
ifneq ($(OcamlHeaders),)
all-local:: build-cmis
clean-local:: clean-cmis
install-local:: install-cmis
uninstall-local:: uninstall-cmis
build-cmis: $(OutputsCMI)
$(OcamlDir)/%.cmi: $(ObjDir)/%.cmi $(OcamlDir)/.dir
$(Verb) $(CP) -f $< $@
$(ObjDir)/%.cmi: $(ObjDir)/%.mli $(ObjDir)/.dir
$(Echo) "Compiling $(notdir $<) for $(BuildMode) build"
$(Verb) $(Compile.CMI) $@ $<
clean-cmis::
-$(Verb) $(RM) -f $(OutputsCMI)
# Also install the .mli's (headers) as documentation.
install-cmis: $(OutputsCMI) $(OcamlHeaders)
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) for i in $(OcamlHeaders:$(ObjDir)/%=%); do \
$(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \
$(DataInstall) $(ObjDir)/$$i "$(PROJ_libocamldir)/$$i"; \
done
$(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \
$(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \
$(DataInstall) $(OcamlDir)/$$i "$(PROJ_libocamldir)/$$i"; \
done
uninstall-cmis::
$(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \
$(EchoCmd) "Uninstalling $(PROJ_libocamldir)/$$i"; \
$(RM) -f "$(PROJ_libocamldir)/$$i"; \
done
$(Verb) for i in $(OcamlHeaders:$(ObjDir)/%=%); do \
$(EchoCmd) "Uninstalling $(PROJ_libocamldir)/$$i"; \
$(RM) -f "$(PROJ_libocamldir)/$$i"; \
done
endif
##===- Build ocaml bytecode archive (.ml's -> .cmo's -> .cma) -------------===##
$(ObjDir)/%.cmo: $(ObjDir)/%.ml
$(Echo) "Compiling $(notdir $<) for $(BuildMode) build"
$(Verb) $(Compile.CMO) $@ $<
ifdef LIBRARYNAME
all-local:: $(OutputCMA)
clean-local:: clean-cma
install-local:: install-cma
uninstall-local:: uninstall-cma
$(OutputCMA): $(LibraryCMA) $(OcamlDir)/.dir
$(Verb) $(CP) -f $< $@
$(LibraryCMA): $(ObjectsCMO) $(OcamlDir)/.dir
$(Echo) "Archiving $(notdir $@) for $(BuildMode) build"
$(Verb) $(Archive.CMA) $@ $(ObjectsCMO)
clean-cma::
$(Verb) $(RM) -f $(OutputCMA) $(UsedLibNames:%=$(OcamlDir)/%)
install-cma:: $(OutputCMA)
$(Echo) "Installing $(BuildMode) $(DestCMA)"
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) $(DataInstall) $(OutputCMA) "$(DestCMA)"
uninstall-cma::
$(Echo) "Uninstalling $(DestCMA)"
-$(Verb) $(RM) -f $(DestCMA)
endif
##===- Build optimized ocaml archive (.ml's -> .cmx's -> .cmxa, .a) -------===##
# The ocamlopt compiler is supported on a set of targets disjoint from LLVM's.
# If unavailable, 'configure' will set HAVE_OCAMLOPT to 0 in Makefile.config.
ifeq ($(HAVE_OCAMLOPT),1)
$(OcamlDir)/%.cmx: $(ObjDir)/%.cmx
$(Verb) $(CP) -f $< $@
$(ObjDir)/%.cmx: $(ObjDir)/%.ml
$(Echo) "Compiling optimized $(notdir $<) for $(BuildMode) build"
$(Verb) $(Compile.CMX) $@ $<
ifdef LIBRARYNAME
all-local:: $(OutputCMXA) $(OutputsCMX)
clean-local:: clean-cmxa
install-local:: install-cmxa
uninstall-local:: uninstall-cmxa
$(OutputCMXA): $(LibraryCMXA)
$(Verb) $(CP) -f $< $@
$(Verb) $(CP) -f $(<:.cmxa=.a) $(@:.cmxa=.a)
$(LibraryCMXA): $(ObjectsCMX)
$(Echo) "Archiving $(notdir $@) for $(BuildMode) build"
$(Verb) $(Archive.CMXA) $@ $(ObjectsCMX)
$(Verb) $(RM) -f $(@:.cmxa=.o)
clean-cmxa::
$(Verb) $(RM) -f $(OutputCMXA) $(OutputCMXA:.cmxa=.a) $(OutputsCMX)
install-cmxa:: $(OutputCMXA) $(OutputsCMX)
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Echo) "Installing $(BuildMode) $(DestCMXA)"
$(Verb) $(DataInstall) $(OutputCMXA) $(DestCMXA)
$(Echo) "Installing $(BuildMode) $(DestCMXA:.cmxa=.a)"
$(Verb) $(DataInstall) $(OutputCMXA:.cmxa=.a) $(DestCMXA:.cmxa=.a)
$(Verb) for i in $(OutputsCMX:$(OcamlDir)/%=%); do \
$(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \
$(DataInstall) $(OcamlDir)/$$i "$(PROJ_libocamldir)/$$i"; \
done
uninstall-cmxa::
$(Echo) "Uninstalling $(DestCMXA)"
$(Verb) $(RM) -f $(DestCMXA)
$(Echo) "Uninstalling $(DestCMXA:.cmxa=.a)"
$(Verb) $(RM) -f $(DestCMXA:.cmxa=.a)
$(Verb) for i in $(OutputsCMX:$(OcamlDir)/%=%); do \
$(EchoCmd) "Uninstalling $(PROJ_libocamldir)/$$i"; \
$(RM) -f $(PROJ_libocamldir)/$$i; \
done
endif
endif
##===- Generate documentation ---------------------------------------------===##
$(ObjDir)/$(LIBRARYNAME).odoc: $(ObjectsCMI)
$(Echo) "Documenting $(notdir $@)"
$(Verb) $(OCAMLFIND) doc -I $(ObjDir) -I $(OcamlDir) -dump $@ $(OcamlHeaders)
ocamldoc: $(ObjDir)/$(LIBRARYNAME).odoc
##===- Debugging gunk -----------------------------------------------------===##
printvars:: printcamlvars
printcamlvars::
$(Echo) "LLVM_CONFIG : " '$(LLVM_CONFIG)'
$(Echo) "OCAMLCFLAGS : " '$(OCAMLCFLAGS)'
$(Echo) "OCAMLAFLAGS : " '$(OCAMLAFLAGS)'
$(Echo) "OCAMLRPATH : " '$(OCAMLRPATH)'
$(Echo) "OCAMLSTUBS : " '$(OCAMLSTUBS)'
$(Echo) "OCAMLSTUBFLAGS : " '$(OCAMLSTUBFLAGS)'
$(Echo) "OCAMLFIND : " '$(OCAMLFIND)'
$(Echo) "Compile.CMI : " '$(Compile.CMI)'
$(Echo) "Compile.CMO : " '$(Compile.CMO)'
$(Echo) "Archive.CMA : " '$(Archive.CMA)'
$(Echo) "Compile.CMX : " '$(Compile.CMX)'
$(Echo) "Archive.CMXA : " '$(Archive.CMXA)'
$(Echo) "CAML_LIBDIR : " '$(CAML_LIBDIR)'
$(Echo) "LibraryA : " '$(LibraryA)'
$(Echo) "LibraryCMA : " '$(LibraryCMA)'
$(Echo) "LibraryCMXA : " '$(LibraryCMXA)'
$(Echo) "SharedLib : " '$(SharedLib)'
$(Echo) "OcamlSources1: " '$(OcamlSources1)'
$(Echo) "OcamlSources2: " '$(OcamlSources2)'
$(Echo) "OcamlSources : " '$(OcamlSources)'
$(Echo) "OcamlHeaders1: " '$(OcamlHeaders1)'
$(Echo) "OcamlHeaders2: " '$(OcamlHeaders2)'
$(Echo) "OcamlHeaders : " '$(OcamlHeaders)'
$(Echo) "ObjectsCMI : " '$(ObjectsCMI)'
$(Echo) "ObjectsCMO : " '$(ObjectsCMO)'
$(Echo) "ObjectsCMX : " '$(ObjectsCMX)'
$(Echo) "OCAML_LIBDIR : " '$(OCAML_LIBDIR)'
$(Echo) "DestA : " '$(DestA)'
$(Echo) "DestCMA : " '$(DestCMA)'
$(Echo) "DestCMXA : " '$(DestCMXA)'
$(Echo) "DestSharedLib: " '$(DestSharedLib)'
$(Echo) "UsedLibs : " '$(UsedLibs)'
$(Echo) "UsedLibNames : " '$(UsedLibNames)'
$(Echo) "ExtraLibs : " '$(ExtraLibs)'
.PHONY: printcamlvars build-cmis \
clean-a clean-cmis clean-cma clean-cmxa \
install-a install-cmis install-cma install-cmxa \
install-exe \
uninstall-a uninstall-cmis uninstall-cma uninstall-cmxa \
uninstall-exe

View File

@ -1,21 +0,0 @@
##===- bindings/ocaml/all_backends/Makefile ----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_all_backends interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
include $(LEVEL)/Makefile.config
LIBRARYNAME := llvm_all_backends
UsedComponents := $(TARGETS_TO_BUILD)
UsedOcamlInterfaces :=
include ../Makefile.ocaml

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/analysis/Makefile --------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_analysis interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm_analysis
UsedComponents := analysis
UsedOcamlInterfaces := llvm
include ../Makefile.ocaml

View File

@ -1,61 +0,0 @@
##===- bindings/ocaml/backends/Makefile --------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the master makefile for backend-specific bindings. It works by
# creating a stub makefile for each configured target, e.g. Makefile.ARM, and
# invoking it to compile the corresponding library, e.g. Llvm_ARM.
#
# This scheme allows to keep changes to Makefile.ocaml minimal.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
ExtraMakefiles = $(PROJ_OBJ_DIR)/Makefile.common
include $(LEVEL)/Makefile.config
include $(LEVEL)/Makefile.common
all-local:: all-backends
clean-local:: clean-backends
install-local:: install-backends
uninstall-local:: uninstall-backends
stubs:
$(Verb) for i in $(TARGETS_TO_BUILD); do \
$(ECHO) "TARGET := $$i" > Makefile.$$i; \
$(ECHO) "include Makefile.common" >> Makefile.$$i; \
done
all-backends: stubs
$(Verb) for i in $(TARGETS_TO_BUILD); do \
$(MAKE) -f Makefile.$$i all; \
done
clean-backends: stubs
$(Verb) for i in $(TARGETS_TO_BUILD); do \
$(MAKE) -f Makefile.$$i clean; \
$(RM) -f Makefile.$$i; \
done
install-backends: stubs
$(Verb) for i in $(TARGETS_TO_BUILD); do \
$(MAKE) -f Makefile.$$i install; \
done
uninstall-backends: stubs
$(Verb) for i in $(TARGETS_TO_BUILD); do \
$(MAKE) -f Makefile.$$i uninstall; \
done
ocamldoc: stubs
$(Verb) for i in $(TARGETS_TO_BUILD); do \
$(MAKE) -f Makefile.$$i ocamldoc; \
done
.PHONY: all-backends clean-backends install-backends uninstall-backends ocamldoc

View File

@ -1,65 +0,0 @@
##===- bindings/ocaml/backends/Makefile.common -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the slave makefile for backend-specific bindings. This makefile should
# be included after defining TARGET. It will then substitute @TARGET@ for
# the value of TARGET in various *.in files and build an OCaml library in
# a regular way.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm_$(TARGET)
UsedComponents := $(TARGET)
UsedOcamlInterfaces := llvm
include $(LEVEL)/Makefile.config
SOURCES := $(TARGET)_ocaml.c
OcamlHeaders1 := $(PROJ_SRC_DIR)/llvm_$(TARGET).mli
OcamlSources1 := $(PROJ_SRC_DIR)/llvm_$(TARGET).ml
include ../Makefile.ocaml
$(ObjDir)/llvm_$(TARGET).ml: $(PROJ_SRC_DIR)/llvm_backend.ml.in $(ObjDir)/.dir
$(Verb) $(SED) -e 's/@TARGET@/$(TARGET)/' $< > $@
$(ObjDir)/llvm_$(TARGET).mli: $(PROJ_SRC_DIR)/llvm_backend.mli.in $(ObjDir)/.dir
$(Verb) $(SED) -e 's/@TARGET@/$(TARGET)/' $< > $@
$(ObjDir)/$(TARGET)_ocaml.o: $(PROJ_SRC_DIR)/backend_ocaml.c $(ObjDir)/.dir
$(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG)
$(Verb) $(Compile.C) -DTARGET=$(TARGET) $< -o $@
##===- OCamlFind Package --------------------------------------------------===##
all-local:: copy-meta
install-local:: install-meta
uninstall-local:: uninstall-meta
DestMETA := $(PROJ_libocamldir)/META.llvm_$(TARGET)
# Easy way of generating META in the objdir
copy-meta: $(OcamlDir)/META.llvm_$(TARGET)
$(OcamlDir)/META.llvm_$(TARGET): META.llvm_backend.in
$(Verb) $(SED) -e 's/@TARGET@/$(TARGET)/' \
-e 's/@PACKAGE_VERSION@/$(LLVMVersion)/' $< > $@
install-meta:: $(OcamlDir)/META.llvm_$(TARGET)
$(Echo) "Install $(BuildMode) $(DestMETA)"
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) $(DataInstall) $< "$(DestMETA)"
uninstall-meta::
$(Echo) "Uninstalling $(DestMETA)"
-$(Verb) $(RM) -f "$(DestMETA)"
.PHONY: copy-meta install-meta uninstall-meta

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/bitreader/Makefile -------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_bitreader interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm_bitreader
UsedComponents := bitreader
UsedOcamlInterfaces := llvm
include ../Makefile.ocaml

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/bitwriter/Makefile -------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_bitwriter interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm_bitwriter
UsedComponents := bitwriter
UsedOcamlInterfaces := llvm
include ../Makefile.ocaml

View File

@ -1,20 +0,0 @@
##===- bindings/ocaml/executionengine/Makefile -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_executionengine interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm_executionengine
UsedComponents := executionengine mcjit native
UsedOcamlInterfaces := llvm llvm_target
FindlibPackages := ctypes
include ../Makefile.ocaml

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/irreader/Makefile --------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_irreader interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm_irreader
UsedComponents := irreader
UsedOcamlInterfaces := llvm
include ../Makefile.ocaml

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/linker/Makefile ----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_target interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm_linker
UsedComponents := linker
UsedOcamlInterfaces := llvm
include ../Makefile.ocaml

View File

@ -1,43 +0,0 @@
##===- bindings/ocaml/llvm/Makefile ------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm
UsedComponents := core
UsedOcamlLibs := llvm
ExtraLibs := -lstdc++
include ../Makefile.ocaml
all-local:: copy-meta
install-local:: install-meta
uninstall-local:: uninstall-meta
DestMETA := $(PROJ_libocamldir)/META.llvm
# Easy way of generating META in the objdir
copy-meta: $(OcamlDir)/META.llvm
$(OcamlDir)/META.llvm: META.llvm
$(Verb) $(CP) -f $< $@
install-meta:: $(OcamlDir)/META.llvm
$(Echo) "Install $(BuildMode) $(DestMETA)"
$(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) $(DataInstall) $< "$(DestMETA)"
uninstall-meta::
$(Echo) "Uninstalling $(DestMETA)"
-$(Verb) $(RM) -f "$(DestMETA)"
.PHONY: copy-meta install-meta uninstall-meta

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/target/Makefile ----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_target interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
LIBRARYNAME := llvm_target
UsedComponents := target
UsedOcamlInterfaces := llvm
include ../Makefile.ocaml

View File

@ -1,18 +0,0 @@
##===- bindings/ocaml/transforms/Makefile ------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
DIRS = ipo passmgr_builder scalar_opts utils vectorize
ocamldoc:
$(Verb) for i in $(DIRS) ; do \
$(MAKE) -C $$i ocamldoc; \
done
include $(LEVEL)/Makefile.common

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/transforms/ipo/Makefile --------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_ipo interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../../..
LIBRARYNAME := llvm_ipo
UsedComponents := ipo
UsedOcamlInterfaces := llvm
include ../../Makefile.ocaml

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/transforms/passmgr_builder/Makefile --*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_passmgr_builder interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../../..
LIBRARYNAME := llvm_passmgr_builder
UsedComponents := ipo
UsedOcamlInterfaces := llvm
include ../../Makefile.ocaml

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/transforms/scalar_opts/Makefile ------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_scalar_opts interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../../..
LIBRARYNAME := llvm_scalar_opts
UsedComponents := scalaropts
UsedOcamlInterfaces := llvm
include ../../Makefile.ocaml

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/transforms/utils/Makefile ------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_vectorize interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../../..
LIBRARYNAME := llvm_transform_utils
UsedComponents := transformutils
UsedOcamlInterfaces := llvm
include ../../Makefile.ocaml

View File

@ -1,19 +0,0 @@
##===- bindings/ocaml/transforms/vectorize/Makefile --------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml Llvm_vectorize interface.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../../..
LIBRARYNAME := llvm_vectorize
UsedComponents := vectorize
UsedOcamlInterfaces := llvm
include ../../Makefile.ocaml

View File

@ -1,12 +0,0 @@
##===- cmake/Makefile --------------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ..
DIRS := modules
include $(LEVEL)/Makefile.common

0
autoconf/config.guess → cmake/config.guess vendored Executable file → Normal file
View File

View File

@ -15,7 +15,7 @@ function( get_host_triple var )
set( value "i686-pc-mingw32" ) set( value "i686-pc-mingw32" )
endif() endif()
else( MSVC ) else( MSVC )
set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess) set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
execute_process(COMMAND sh ${config_guess} execute_process(COMMAND sh ${config_guess}
RESULT_VARIABLE TT_RV RESULT_VARIABLE TT_RV
OUTPUT_VARIABLE TT_OUT OUTPUT_VARIABLE TT_OUT

View File

@ -1,150 +0,0 @@
##===- cmake/modules/Makefile ------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
include $(LEVEL)/Makefile.common
PROJ_cmake := $(DESTDIR)$(PROJ_prefix)/share/llvm/cmake
ifeq ($(DISABLE_ASSERTIONS),1)
LLVM_ENABLE_ASSERTIONS := 0
else
LLVM_ENABLE_ASSERTIONS := 1
endif
ifeq ($(ENABLE_ABI_BREAKING_CHECKS),1)
LLVM_ABI_BREAKING_CHECKS := FORCE_ON
else
LLVM_ABI_BREAKING_CHECKS := FORCE_OFF
endif
ifeq ($(REQUIRES_EH),1)
LLVM_ENABLE_EH := 1
else
LLVM_ENABLE_EH := 0
endif
ifeq ($(REQUIRES_RTTI),1)
LLVM_ENABLE_RTTI := 1
else
LLVM_ENABLE_RTTI := 0
endif
ifndef LLVM_LIBS_TO_EXPORT
$(error LLVM_LIBS_TO_EXPORT cannot be empty)
endif
OBJMODS := LLVMConfig.cmake LLVMConfigVersion.cmake LLVMExports.cmake
LLVM_CONFIG_CODE := \
\# Compute the CMake directory from the LLVMConfig.cmake file location.\n\
get_filename_component(_LLVM_CMAKE_DIR "$${CMAKE_CURRENT_LIST_FILE}" PATH)\n\
\# Compute the installation prefix from the LLVMConfig.cmake file location.\n\
get_filename_component(LLVM_INSTALL_PREFIX "$${CMAKE_CURRENT_LIST_FILE}" PATH)\n
# Compute number of levels (typically 3 - ``share/llvm/cmake/``) to PROJ_prefix
# from PROJ_cmake, then emit the appropriate number of calls to
# get_filename_components(). Note this assumes there are no spaces in the
# cmake_path_suffix variable.
cmake_path_suffix := $(subst $(PROJ_prefix),,$(subst $(DESTDIR),,$(PROJ_cmake)))
cmake_path_dirs := $(subst /, ,$(cmake_path_suffix))
LLVM_CONFIG_CODE += $(foreach __not_used,$(cmake_path_dirs),get_filename_component(LLVM_INSTALL_PREFIX "$${LLVM_INSTALL_PREFIX}" PATH)\n)
LLVM_CONFIG_CODE += set(_LLVM_LIBRARY_DIR "$${LLVM_INSTALL_PREFIX}\/lib")
$(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in Makefile $(LLVMBuildCMakeFrag)
$(Echo) 'Generating LLVM CMake package config file'
$(Verb) ( \
cat $< | sed \
-e 's/@LLVM_CONFIG_CODE@/$(LLVM_CONFIG_CODE)/' \
-e 's/@LLVM_VERSION_MAJOR@/'"$(LLVM_VERSION_MAJOR)"'/' \
-e 's/@LLVM_VERSION_MINOR@/'"$(LLVM_VERSION_MINOR)"'/' \
-e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \
-e 's/@PACKAGE_VERSION@/'"$(LLVMVersion)"'/' \
-e 's/@LLVM_COMMON_DEPENDS@//' \
-e 's/@LLVM_AVAILABLE_LIBS@/'"$(LLVM_LIBS_TO_EXPORT)"'/' \
-e 's/@LLVM_ALL_TARGETS@/'"$(ALL_TARGETS)"'/' \
-e 's/@LLVM_TARGETS_TO_BUILD@/'"$(TARGETS_TO_BUILD)"'/' \
-e 's/@LLVM_TARGETS_WITH_JIT@/'"$(TARGETS_WITH_JIT)"'/' \
-e 's/@TARGET_TRIPLE@/'"$(TARGET_TRIPLE)"'/' \
-e 's/@LLVM_ABI_BREAKING_CHECKS@/'"$(LLVM_ABI_BREAKING_CHECKS)"'/' \
-e 's/@LLVM_ENABLE_ASSERTIONS@/'"$(LLVM_ENABLE_ASSERTIONS)"'/' \
-e 's/@LLVM_ENABLE_EH@/'"$(LLVM_ENABLE_EH)"'/' \
-e 's/@LLVM_ENABLE_RTTI@/'"$(LLVM_ENABLE_RTTI)"'/' \
-e 's/@LLVM_ENABLE_TERMINFO@/'"$(ENABLE_TERMINFO)"'/' \
-e 's/@LLVM_ENABLE_THREADS@/'"$(ENABLE_THREADS)"'/' \
-e 's/@LLVM_ENABLE_ZLIB@/'"$(ENABLE_ZLIB)"'/' \
-e 's/@LLVM_NATIVE_ARCH@/'"$(LLVM_NATIVE_ARCH)"'/' \
-e 's/@LLVM_ENABLE_PIC@/'"$(ENABLE_PIC)"'/' \
-e 's/@LLVM_ON_UNIX@/'"$(LLVM_ON_UNIX)"'/' \
-e 's/@LLVM_ON_WIN32@/'"$(LLVM_ON_WIN32)"'/' \
-e 's/@LLVM_LIBDIR_SUFFIX@//' \
-e 's#@LLVM_CONFIG_INCLUDE_DIRS@#$${LLVM_INSTALL_PREFIX}/include#' \
-e 's#@LLVM_CONFIG_LIBRARY_DIRS@#$${_LLVM_LIBRARY_DIR}#' \
-e 's#@LLVM_CONFIG_CMAKE_DIR@#$${_LLVM_CMAKE_DIR}#' \
-e 's#@LLVM_CONFIG_TOOLS_BINARY_DIR@#$${LLVM_INSTALL_PREFIX}/bin#' \
-e 's/@LLVM_CONFIG_EXPORTS_FILE@/$${LLVM_CMAKE_DIR}\/LLVMExports.cmake/' \
-e 's/@all_llvm_lib_deps@//' \
&& \
( grep '^set_property.*LLVMBUILD_LIB_DEPS_' "$(LLVMBuildCMakeFrag)" | \
grep -v LLVMBUILD_LIB_DEPS_gtest ) && \
echo 'unset(_LLVM_CMAKE_DIR)' && \
echo 'unset(_LLVM_LIBRARY_DIR)' \
) > $@
$(PROJ_OBJ_DIR)/LLVMConfigVersion.cmake: LLVMConfigVersion.cmake.in Makefile
$(Echo) 'Generating LLVM CMake package version file'
$(Verb) cat $< | sed \
-e 's/@PACKAGE_VERSION@/'"$(LLVMVersion)"'/' \
-e 's/@LLVM_VERSION_MAJOR@/'"$(LLVM_VERSION_MAJOR)"'/' \
-e 's/@LLVM_VERSION_MINOR@/'"$(LLVM_VERSION_MINOR)"'/' \
-e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \
> $@
$(PROJ_OBJ_DIR)/LLVMExports.cmake: $(LLVMBuildCMakeExportsFrag) Makefile
$(Echo) 'Generating LLVM CMake target exports file'
$(Verb) ( \
echo '# LLVM CMake target exports. Do not include directly.' && \
for lib in $(LLVM_LIBS_TO_EXPORT); do \
echo 'add_library('"$$lib"' STATIC IMPORTED)' && \
echo 'set_property(TARGET '"$$lib"' PROPERTY IMPORTED_LOCATION "$${_LLVM_LIBRARY_DIR}/'lib$$lib.a'")' ; \
done && \
cat "$(LLVMBuildCMakeExportsFrag)" && \
echo 'set_property(TARGET LLVMSupport APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES '"$(subst -l,,$(LIBS))"')' \
) > $@
all-local:: $(addprefix $(PROJ_OBJ_DIR)/, $(OBJMODS))
SKIPSRCMODS := \
CheckAtomic.cmake \
GetHostTriple.cmake \
LLVMBuildExports.cmake \
LLVMConfig.cmake \
LLVMConfigVersion.cmake \
LLVMExports.cmake
SRCMODS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cmake))
SRCMODS := $(filter-out $(SKIPSRCMODS),$(SRCMODS))
INSTSRCMODS := $(addprefix $(PROJ_cmake)/, $(SRCMODS))
INSTOBJMODS := $(addprefix $(PROJ_cmake)/, $(OBJMODS))
$(PROJ_cmake):
$(Echo) Making install directory: $@
$(Verb) $(MKDIR) $@
$(INSTSRCMODS): $(PROJ_cmake)/%.cmake: $(PROJ_SRC_DIR)/%.cmake | $(PROJ_cmake)
$(Echo) Installing cmake modules: $(notdir $<)
$(Verb) $(DataInstall) $< $(PROJ_cmake)
$(INSTOBJMODS): $(PROJ_cmake)/%.cmake: $(PROJ_OBJ_DIR)/%.cmake | $(PROJ_cmake)
$(Echo) Installing cmake modules: $(notdir $<)
$(Verb) $(DataInstall) $< $(PROJ_cmake)
install-local:: $(INSTSRCMODS) $(INSTOBJMODS)

19471
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,138 +0,0 @@
##===- docs/Makefile ---------------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL := ..
DIRS :=
ifdef BUILD_FOR_WEBSITE
PROJ_OBJ_DIR = .
DOXYGEN = doxygen
$(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in
cat $< | sed \
-e 's/@DOT@/dot/g' \
-e 's/@PACKAGE_VERSION@/mainline/' \
-e 's/@abs_top_builddir@/../g' \
-e 's/@abs_top_srcdir@/../g' \
-e 's/@enable_external_search@/NO/g' \
-e 's/@enable_searchengine@/NO/g' \
-e 's/@enable_server_based_search@/NO/g' \
-e 's/@extra_search_mappings@//g' \
-e 's/@llvm_doxygen_generate_qhp@//g' \
-e 's/@llvm_doxygen_qch_filename@//g' \
-e 's/@llvm_doxygen_qhelpgenerator_path@//g' \
-e 's/@llvm_doxygen_qhp_cust_filter_attrs@//g' \
-e 's/@llvm_doxygen_qhp_cust_filter_name@//g' \
-e 's/@llvm_doxygen_qhp_namespace@//g' \
-e 's/@searchengine_url@//g' \
-e 's/@DOT_IMAGE_FORMAT@/png/g' \
> $@
endif
include $(LEVEL)/Makefile.common
HTML := $(wildcard $(PROJ_SRC_DIR)/*.html) \
$(wildcard $(PROJ_SRC_DIR)/*.css)
DOXYFILES := doxygen.cfg.in doxygen.intro
.PHONY: install-html install-doxygen doxygen install-ocamldoc ocamldoc generated
install_targets := install-html
ifeq ($(ENABLE_DOXYGEN),1)
install_targets += install-doxygen
endif
ifdef OCAMLFIND
ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD)))
install_targets += install-ocamldoc
endif
endif
install-local:: $(install_targets)
generated_targets := doxygen
ifdef OCAMLFIND
generated_targets += ocamldoc
endif
# Live documentation is generated for the web site using this target:
# 'make generated BUILD_FOR_WEBSITE=1'
generated:: $(generated_targets)
install-html: $(PROJ_OBJ_DIR)/html.tar.gz
$(Echo) Installing HTML documentation
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html
$(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html
$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir)
$(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
$(Echo) Packaging HTML documentation
$(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/html.tar
$(Verb) cd $(PROJ_SRC_DIR) && \
$(TAR) cf $(PROJ_OBJ_DIR)/html.tar *.html
$(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/html.tar
install-doxygen: doxygen
$(Echo) Installing doxygen documentation
$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir)
$(Verb) cd $(PROJ_OBJ_DIR)/doxygen/html && \
for DIR in $$($(FIND) . -type d); do \
DESTSUB="$(DESTDIR)$(PROJ_docsdir)/html/doxygen/$$(echo $$DIR | cut -c 3-)"; \
$(MKDIR) $$DESTSUB && \
$(FIND) $$DIR -maxdepth 1 -type f -exec $(DataInstall) {} $$DESTSUB \; ; \
if [ $$? != 0 ]; then exit 1; fi \
done
doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz
regendoc:
$(Echo) Building doxygen documentation
$(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/doxygen
$(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg
$(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg
$(Echo) Packaging doxygen documentation
$(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar
$(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen
$(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/doxygen.tar
$(Verb) $(CP) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_OBJ_DIR)/doxygen/html/
userloc: $(LLVM_SRC_ROOT)/docs/userloc.html
$(LLVM_SRC_ROOT)/docs/userloc.html:
$(Echo) Making User LOC Table
$(Verb) cd $(LLVM_SRC_ROOT) ; ./utils/userloc.pl -details -recurse \
-html lib include tools runtime utils examples autoconf test > docs/userloc.html
install-ocamldoc: ocamldoc
$(Echo) Installing ocamldoc documentation
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html
$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir)
$(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \
$(FIND) . -type f -exec \
$(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \;
ocamldoc: regen-ocamldoc
$(Echo) Packaging ocamldoc documentation
$(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar*
$(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc
$(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/ocamldoc.tar
$(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/
regen-ocamldoc:
$(Echo) Building ocamldoc documentation
$(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc
$(Verb) $(MAKE) -C $(LEVEL)/bindings/ocaml ocamldoc
$(Verb) $(MKDIR) $(PROJ_OBJ_DIR)/ocamldoc/html
$(Verb) \
$(OCAMLFIND) ocamldoc -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \
`$(FIND) $(LEVEL)/bindings/ocaml -name "*.odoc" \
-path "*/$(BuildMode)/*.odoc" -exec echo -load '{}' ';'`
uninstall-local::
$(Echo) Uninstalling Documentation
$(Verb) $(RM) -rf $(DESTDIR)$(PROJ_docsdir)

View File

@ -1,155 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
all: html
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/llvm.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/llvm.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/llvm"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/llvm"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

View File

@ -1,916 +0,0 @@
===================
LLVM Makefile Guide
===================
.. contents::
:local:
Introduction
============
This document provides *usage* information about the LLVM makefile system. While
loosely patterned after the BSD makefile system, LLVM has taken a departure from
BSD in order to implement additional features needed by LLVM. Although makefile
systems, such as ``automake``, were attempted at one point, it has become clear
that the features needed by LLVM and the ``Makefile`` norm are too great to use
a more limited tool. Consequently, LLVM requires simply GNU Make 3.79, a widely
portable makefile processor. LLVM unabashedly makes heavy use of the features of
GNU Make so the dependency on GNU Make is firm. If you're not familiar with
``make``, it is recommended that you read the `GNU Makefile Manual
<http://www.gnu.org/software/make/manual/make.html>`_.
While this document is rightly part of the `LLVM Programmer's
Manual <ProgrammersManual.html>`_, it is treated separately here because of the
volume of content and because it is often an early source of bewilderment for
new developers.
General Concepts
================
The LLVM Makefile System is the component of LLVM that is responsible for
building the software, testing it, generating distributions, checking those
distributions, installing and uninstalling, etc. It consists of a several files
throughout the source tree. These files and other general concepts are described
in this section.
Projects
--------
The LLVM Makefile System is quite generous. It not only builds its own software,
but it can build yours too. Built into the system is knowledge of the
``llvm/projects`` directory. Any directory under ``projects`` that has both a
``configure`` script and a ``Makefile`` is assumed to be a project that uses the
LLVM Makefile system. Building software that uses LLVM does not require the
LLVM Makefile System nor even placement in the ``llvm/projects``
directory. However, doing so will allow your project to get up and running
quickly by utilizing the built-in features that are used to compile LLVM. LLVM
compiles itself using the same features of the makefile system as used for
projects.
For further details, consult the `Projects <Projects.html>`_ page.
Variable Values
---------------
To use the makefile system, you simply create a file named ``Makefile`` in your
directory and declare values for certain variables. The variables and values
that you select determine what the makefile system will do. These variables
enable rules and processing in the makefile system that automatically Do The
Right Thing (C).
Including Makefiles
-------------------
Setting variables alone is not enough. You must include into your Makefile
additional files that provide the rules of the LLVM Makefile system. The various
files involved are described in the sections that follow.
``Makefile``
^^^^^^^^^^^^
Each directory to participate in the build needs to have a file named
``Makefile``. This is the file first read by ``make``. It has three
sections:
#. Settable Variables --- Required that must be set first.
#. ``include $(LEVEL)/Makefile.common`` --- include the LLVM Makefile system.
#. Override Variables --- Override variables set by the LLVM Makefile system.
.. _$(LEVEL)/Makefile.common:
``Makefile.common``
^^^^^^^^^^^^^^^^^^^
Every project must have a ``Makefile.common`` file at its top source
directory. This file serves three purposes:
#. It includes the project's configuration makefile to obtain values determined
by the ``configure`` script. This is done by including the
`$(LEVEL)/Makefile.config`_ file.
#. It specifies any other (static) values that are needed throughout the
project. Only values that are used in all or a large proportion of the
project's directories should be placed here.
#. It includes the standard rules for the LLVM Makefile system,
`$(LLVM_SRC_ROOT)/Makefile.rules`_. This file is the *guts* of the LLVM
``Makefile`` system.
.. _$(LEVEL)/Makefile.config:
``Makefile.config``
^^^^^^^^^^^^^^^^^^^
Every project must have a ``Makefile.config`` at the top of its *build*
directory. This file is **generated** by the ``configure`` script from the
pattern provided by the ``Makefile.config.in`` file located at the top of the
project's *source* directory. The contents of this file depend largely on what
configuration items the project uses, however most projects can get what they
need by just relying on LLVM's configuration found in
``$(LLVM_OBJ_ROOT)/Makefile.config``.
.. _$(LLVM_SRC_ROOT)/Makefile.rules:
``Makefile.rules``
^^^^^^^^^^^^^^^^^^
This file, located at ``$(LLVM_SRC_ROOT)/Makefile.rules`` is the heart of the
LLVM Makefile System. It provides all the logic, dependencies, and rules for
building the targets supported by the system. What it does largely depends on
the values of ``make`` `variables`_ that have been set *before*
``Makefile.rules`` is included.
Comments
^^^^^^^^
User ``Makefile``\s need not have comments in them unless the construction is
unusual or it does not strictly follow the rules and patterns of the LLVM
makefile system. Makefile comments are invoked with the pound (``#``) character.
The ``#`` character and any text following it, to the end of the line, are
ignored by ``make``.
Tutorial
========
This section provides some examples of the different kinds of modules you can
build with the LLVM makefile system. In general, each directory you provide will
build a single object although that object may be composed of additionally
compiled components.
Libraries
---------
Only a few variable definitions are needed to build a regular library.
Normally, the makefile system will build all the software into a single
``libname.o`` (pre-linked) object. This means the library is not searchable and
that the distinction between compilation units has been dissolved. Optionally,
you can ask for a shared library (.so) or archive library (.a) built. Archive
libraries are the default. For example:
.. code-block:: makefile
LIBRARYNAME = mylib
SHARED_LIBRARY = 1
BUILD_ARCHIVE = 1
says to build a library named ``mylib`` with both a shared library
(``mylib.so``) and an archive library (``mylib.a``) version. The contents of all
the libraries produced will be the same, they are just constructed differently.
Note that you normally do not need to specify the sources involved. The LLVM
Makefile system will infer the source files from the contents of the source
directory.
The ``LOADABLE_MODULE=1`` directive can be used in conjunction with
``SHARED_LIBRARY=1`` to indicate that the resulting shared library should be
openable with the ``dlopen`` function and searchable with the ``dlsym`` function
(or your operating system's equivalents). While this isn't strictly necessary on
Linux and a few other platforms, it is required on systems like HP-UX and
Darwin. You should use ``LOADABLE_MODULE`` for any shared library that you
intend to be loaded into an tool via the ``-load`` option. :ref:`Pass
documentation <writing-an-llvm-pass-makefile>` has an example of why you might
want to do this.
Loadable Modules
^^^^^^^^^^^^^^^^
In some situations, you need to create a loadable module. Loadable modules can
be loaded into programs like ``opt`` or ``llc`` to specify additional passes to
run or targets to support. Loadable modules are also useful for debugging a
pass or providing a pass with another package if that pass can't be included in
LLVM.
LLVM provides complete support for building such a module. All you need to do is
use the ``LOADABLE_MODULE`` variable in your ``Makefile``. For example, to build
a loadable module named ``MyMod`` that uses the LLVM libraries ``LLVMSupport.a``
and ``LLVMSystem.a``, you would specify:
.. code-block:: makefile
LIBRARYNAME := MyMod
LOADABLE_MODULE := 1
LINK_COMPONENTS := support system
Use of the ``LOADABLE_MODULE`` facility implies several things:
#. There will be no "``lib``" prefix on the module. This differentiates it from
a standard shared library of the same name.
#. The `SHARED_LIBRARY`_ variable is turned on.
#. The `LINK_LIBS_IN_SHARED`_ variable is turned on.
A loadable module is loaded by LLVM via the facilities of libtool's libltdl
library which is part of ``lib/System`` implementation.
Tools
-----
For building executable programs (tools), you must provide the name of the tool
and the names of the libraries you wish to link with the tool. For example:
.. code-block:: makefile
TOOLNAME = mytool
USEDLIBS = mylib
LINK_COMPONENTS = support system
says that we are to build a tool name ``mytool`` and that it requires three
libraries: ``mylib``, ``LLVMSupport.a`` and ``LLVMSystem.a``.
Note that two different variables are used to indicate which libraries are
linked: ``USEDLIBS`` and ``LLVMLIBS``. This distinction is necessary to support
projects. ``LLVMLIBS`` refers to the LLVM libraries found in the LLVM object
directory. ``USEDLIBS`` refers to the libraries built by your project. In the
case of building LLVM tools, ``USEDLIBS`` and ``LLVMLIBS`` can be used
interchangeably since the "project" is LLVM itself and ``USEDLIBS`` refers to
the same place as ``LLVMLIBS``.
Also note that there are two different ways of specifying a library: with a
``.a`` suffix and without. Without the suffix, the entry refers to the re-linked
(.o) file which will include *all* symbols of the library. This is
useful, for example, to include all passes from a library of passes. If the
``.a`` suffix is used then the library is linked as a searchable library (with
the ``-l`` option). In this case, only the symbols that are unresolved *at
that point* will be resolved from the library, if they exist. Other
(unreferenced) symbols will not be included when the ``.a`` syntax is used. Note
that in order to use the ``.a`` suffix, the library in question must have been
built with the ``BUILD_ARCHIVE`` option set.
JIT Tools
^^^^^^^^^
Many tools will want to use the JIT features of LLVM. To do this, you simply
specify that you want an execution 'engine', and the makefiles will
automatically link in the appropriate JIT for the host or an interpreter if none
is available:
.. code-block:: makefile
TOOLNAME = my_jit_tool
USEDLIBS = mylib
LINK_COMPONENTS = engine
Of course, any additional libraries may be listed as other components. To get a
full understanding of how this changes the linker command, it is recommended
that you:
.. code-block:: bash
% cd examples/Fibonacci
% make VERBOSE=1
Targets Supported
=================
This section describes each of the targets that can be built using the LLVM
Makefile system. Any target can be invoked from any directory but not all are
applicable to a given directory (e.g. "check", "dist" and "install" will always
operate as if invoked from the top level directory).
================= =============== ==================
Target Name Implied Targets Target Description
================= =============== ==================
``all`` \ Compile the software recursively. Default target.
``all-local`` \ Compile the software in the local directory only.
``check`` \ Change to the ``test`` directory in a project and run the test suite there.
``check-local`` \ Run a local test suite. Generally this is only defined in the ``Makefile`` of the project's ``test`` directory.
``clean`` \ Remove built objects recursively.
``clean-local`` \ Remove built objects from the local directory only.
``dist`` ``all`` Prepare a source distribution tarball.
``dist-check`` ``all`` Prepare a source distribution tarball and check that it builds.
``dist-clean`` ``clean`` Clean source distribution tarball temporary files.
``install`` ``all`` Copy built objects to installation directory.
``preconditions`` ``all`` Check to make sure configuration and makefiles are up to date.
``printvars`` ``all`` Prints variables defined by the makefile system (for debugging).
``tags`` \ Make C and C++ tags files for emacs and vi.
``uninstall`` \ Remove built objects from installation directory.
================= =============== ==================
.. _all:
``all`` (default)
-----------------
When you invoke ``make`` with no arguments, you are implicitly instructing it to
seek the ``all`` target (goal). This target is used for building the software
recursively and will do different things in different directories. For example,
in a ``lib`` directory, the ``all`` target will compile source files and
generate libraries. But, in a ``tools`` directory, it will link libraries and
generate executables.
``all-local``
-------------
This target is the same as `all`_ but it operates only on the current directory
instead of recursively.
``check``
---------
This target can be invoked from anywhere within a project's directories but
always invokes the `check-local`_ target in the project's ``test`` directory, if
it exists and has a ``Makefile``. A warning is produced otherwise. If
`TESTSUITE`_ is defined on the ``make`` command line, it will be passed down to
the invocation of ``make check-local`` in the ``test`` directory. The intended
usage for this is to assist in running specific suites of tests. If
``TESTSUITE`` is not set, the implementation of ``check-local`` should run all
normal tests. It is up to the project to define what different values for
``TESTSUTE`` will do. See the :doc:`Testing Guide <TestingGuide>` for further
details.
``check-local``
---------------
This target should be implemented by the ``Makefile`` in the project's ``test``
directory. It is invoked by the ``check`` target elsewhere. Each project is
free to define the actions of ``check-local`` as appropriate for that
project. The LLVM project itself uses the :doc:`Lit <CommandGuide/lit>` testing
tool to run a suite of feature and regression tests. Other projects may choose
to use :program:`lit` or any other testing mechanism.
``clean``
---------
This target cleans the build directory, recursively removing all things that the
Makefile builds. The cleaning rules have been made guarded so they shouldn't go
awry (via ``rm -f $(UNSET_VARIABLE)/*`` which will attempt to erase the entire
directory structure).
``clean-local``
---------------
This target does the same thing as ``clean`` but only for the current (local)
directory.
``dist``
--------
This target builds a distribution tarball. It first builds the entire project
using the ``all`` target and then tars up the necessary files and compresses
it. The generated tarball is sufficient for a casual source distribution, but
probably not for a release (see ``dist-check``).
``dist-check``
--------------
This target does the same thing as the ``dist`` target but also checks the
distribution tarball. The check is made by unpacking the tarball to a new
directory, configuring it, building it, installing it, and then verifying that
the installation results are correct (by comparing to the original build). This
target can take a long time to run but should be done before a release goes out
to make sure that the distributed tarball can actually be built into a working
release.
``dist-clean``
--------------
This is a special form of the ``clean`` clean target. It performs a normal
``clean`` but also removes things pertaining to building the distribution.
``install``
-----------
This target finalizes shared objects and executables and copies all libraries,
headers, executables and documentation to the directory given with the
``--prefix`` option to ``configure``. When completed, the prefix directory will
have everything needed to **use** LLVM.
The LLVM makefiles can generate complete **internal** documentation for all the
classes by using ``doxygen``. By default, this feature is **not** enabled
because it takes a long time and generates a massive amount of data (>100MB). If
you want this feature, you must configure LLVM with the --enable-doxygen switch
and ensure that a modern version of doxygen (1.3.7 or later) is available in
your ``PATH``. You can download doxygen from `here
<http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc>`_.
``preconditions``
-----------------
This utility target checks to see if the ``Makefile`` in the object directory is
older than the ``Makefile`` in the source directory and copies it if so. It also
reruns the ``configure`` script if that needs to be done and rebuilds the
``Makefile.config`` file similarly. Users may overload this target to ensure
that sanity checks are run *before* any building of targets as all the targets
depend on ``preconditions``.
``printvars``
-------------
This utility target just causes the LLVM makefiles to print out some of the
makefile variables so that you can double check how things are set.
``reconfigure``
---------------
This utility target will force a reconfigure of LLVM or your project. It simply
runs ``$(PROJ_OBJ_ROOT)/config.status --recheck`` to rerun the configuration
tests and rebuild the configured files. This isn't generally useful as the
makefiles will reconfigure themselves whenever its necessary.
``spotless``
------------
.. warning::
Use with caution!
This utility target, only available when ``$(PROJ_OBJ_ROOT)`` is not the same as
``$(PROJ_SRC_ROOT)``, will completely clean the ``$(PROJ_OBJ_ROOT)`` directory
by removing its content entirely and reconfiguring the directory. This returns
the ``$(PROJ_OBJ_ROOT)`` directory to a completely fresh state. All content in
the directory except configured files and top-level makefiles will be lost.
``tags``
--------
This target will generate a ``TAGS`` file in the top-level source directory. It
is meant for use with emacs, XEmacs, or ViM. The TAGS file provides an index of
symbol definitions so that the editor can jump you to the definition
quickly.
``uninstall``
-------------
This target is the opposite of the ``install`` target. It removes the header,
library and executable files from the installation directories. Note that the
directories themselves are not removed because it is not guaranteed that LLVM is
the only thing installing there (e.g. ``--prefix=/usr``).
.. _variables:
Variables
=========
Variables are used to tell the LLVM Makefile System what to do and to obtain
information from it. Variables are also used internally by the LLVM Makefile
System. Variable names that contain only the upper case alphabetic letters and
underscore are intended for use by the end user. All other variables are
internal to the LLVM Makefile System and should not be relied upon nor
modified. The sections below describe how to use the LLVM Makefile
variables.
Control Variables
-----------------
Variables listed in the table below should be set *before* the inclusion of
`$(LEVEL)/Makefile.common`_. These variables provide input to the LLVM make
system that tell it what to do for the current directory.
``BUILD_ARCHIVE``
If set to any value, causes an archive (.a) library to be built.
``BUILT_SOURCES``
Specifies a set of source files that are generated from other source
files. These sources will be built before any other target processing to
ensure they are present.
``CONFIG_FILES``
Specifies a set of configuration files to be installed.
``DEBUG_SYMBOLS``
If set to any value, causes the build to include debugging symbols even in
optimized objects, libraries and executables. This alters the flags
specified to the compilers and linkers. Debugging isn't fun in an optimized
build, but it is possible.
``DIRS``
Specifies a set of directories, usually children of the current directory,
that should also be made using the same goal. These directories will be
built serially.
``DISABLE_AUTO_DEPENDENCIES``
If set to any value, causes the makefiles to **not** automatically generate
dependencies when running the compiler. Use of this feature is discouraged
and it may be removed at a later date.
``ENABLE_OPTIMIZED``
If set to 1, causes the build to generate optimized objects, libraries and
executables. This alters the flags specified to the compilers and
linkers. Generally debugging won't be a fun experience with an optimized
build.
``ENABLE_PROFILING``
If set to 1, causes the build to generate both optimized and profiled
objects, libraries and executables. This alters the flags specified to the
compilers and linkers to ensure that profile data can be collected from the
tools built. Use the ``gprof`` tool to analyze the output from the profiled
tools (``gmon.out``).
``DISABLE_ASSERTIONS``
If set to 1, causes the build to disable assertions, even if building a
debug or profile build. This will exclude all assertion check code from the
build. LLVM will execute faster, but with little help when things go
wrong.
``EXPERIMENTAL_DIRS``
Specify a set of directories that should be built, but if they fail, it
should not cause the build to fail. Note that this should only be used
temporarily while code is being written.
``EXPORTED_SYMBOL_FILE``
Specifies the name of a single file that contains a list of the symbols to
be exported by the linker. One symbol per line.
``EXPORTED_SYMBOL_LIST``
Specifies a set of symbols to be exported by the linker.
``EXTRA_DIST``
Specifies additional files that should be distributed with LLVM. All source
files, all built sources, all Makefiles, and most documentation files will
be automatically distributed. Use this variable to distribute any files that
are not automatically distributed.
``KEEP_SYMBOLS``
If set to any value, specifies that when linking executables the makefiles
should retain debug symbols in the executable. Normally, symbols are
stripped from the executable.
``LEVEL`` (required)
Specify the level of nesting from the top level. This variable must be set
in each makefile as it is used to find the top level and thus the other
makefiles.
``LIBRARYNAME``
Specify the name of the library to be built. (Required For Libraries)
``LINK_COMPONENTS``
When specified for building a tool, the value of this variable will be
passed to the ``llvm-config`` tool to generate a link line for the
tool. Unlike ``USEDLIBS`` and ``LLVMLIBS``, not all libraries need to be
specified. The ``llvm-config`` tool will figure out the library dependencies
and add any libraries that are needed. The ``USEDLIBS`` variable can still
be used in conjunction with ``LINK_COMPONENTS`` so that additional
project-specific libraries can be linked with the LLVM libraries specified
by ``LINK_COMPONENTS``.
.. _LINK_LIBS_IN_SHARED:
``LINK_LIBS_IN_SHARED``
By default, shared library linking will ignore any libraries specified with
the `LLVMLIBS`_ or `USEDLIBS`_. This prevents shared libs from including
things that will be in the LLVM tool the shared library will be loaded
into. However, sometimes it is useful to link certain libraries into your
shared library and this option enables that feature.
.. _LLVMLIBS:
``LLVMLIBS``
Specifies the set of libraries from the LLVM ``$(ObjDir)`` that will be
linked into the tool or library.
``LOADABLE_MODULE``
If set to any value, causes the shared library being built to also be a
loadable module. Loadable modules can be opened with the dlopen() function
and searched with dlsym (or the operating system's equivalent). Note that
setting this variable without also setting ``SHARED_LIBRARY`` will have no
effect.
``NO_INSTALL``
Specifies that the build products of the directory should not be installed
but should be built even if the ``install`` target is given. This is handy
for directories that build libraries or tools that are only used as part of
the build process, such as code generators (e.g. ``tblgen``).
``OPTIONAL_DIRS``
Specify a set of directories that may be built, if they exist, but it is
not an error for them not to exist.
``PARALLEL_DIRS``
Specify a set of directories to build recursively and in parallel if the
``-j`` option was used with ``make``.
.. _SHARED_LIBRARY:
``SHARED_LIBRARY``
If set to any value, causes a shared library (``.so``) to be built in
addition to any other kinds of libraries. Note that this option will cause
all source files to be built twice: once with options for position
independent code and once without. Use it only where you really need a
shared library.
``SOURCES`` (optional)
Specifies the list of source files in the current directory to be
built. Source files of any type may be specified (programs, documentation,
config files, etc.). If not specified, the makefile system will infer the
set of source files from the files present in the current directory.
``SUFFIXES``
Specifies a set of filename suffixes that occur in suffix match rules. Only
set this if your local ``Makefile`` specifies additional suffix match
rules.
``TARGET``
Specifies the name of the LLVM code generation target that the current
directory builds. Setting this variable enables additional rules to build
``.inc`` files from ``.td`` files.
.. _TESTSUITE:
``TESTSUITE``
Specifies the directory of tests to run in ``llvm/test``.
``TOOLNAME``
Specifies the name of the tool that the current directory should build.
``TOOL_VERBOSE``
Implies ``VERBOSE`` and also tells each tool invoked to be verbose. This is
handy when you're trying to see the sub-tools invoked by each tool invoked
by the makefile. For example, this will pass ``-v`` to the GCC compilers
which causes it to print out the command lines it uses to invoke sub-tools
(compiler, assembler, linker).
.. _USEDLIBS:
``USEDLIBS``
Specifies the list of project libraries that will be linked into the tool or
library.
``VERBOSE``
Tells the Makefile system to produce detailed output of what it is doing
instead of just summary comments. This will generate a LOT of output.
Override Variables
------------------
Override variables can be used to override the default values provided by the
LLVM makefile system. These variables can be set in several ways:
* In the environment (e.g. setenv, export) --- not recommended.
* On the ``make`` command line --- recommended.
* On the ``configure`` command line.
* In the Makefile (only *after* the inclusion of `$(LEVEL)/Makefile.common`_).
The override variables are given below:
``AR`` (defaulted)
Specifies the path to the ``ar`` tool.
``PROJ_OBJ_DIR``
The directory into which the products of build rules will be placed. This
might be the same as `PROJ_SRC_DIR`_ but typically is not.
.. _PROJ_SRC_DIR:
``PROJ_SRC_DIR``
The directory which contains the source files to be built.
``BUILD_EXAMPLES``
If set to 1, build examples in ``examples`` and (if building Clang)
``tools/clang/examples`` directories.
``BZIP2`` (configured)
The path to the ``bzip2`` tool.
``CC`` (configured)
The path to the 'C' compiler.
``CFLAGS``
Additional flags to be passed to the 'C' compiler.
``CPPFLAGS``
Additional flags passed to the C/C++ preprocessor.
``CXX``
Specifies the path to the C++ compiler.
``CXXFLAGS``
Additional flags to be passed to the C++ compiler.
``DATE`` (configured)
Specifies the path to the ``date`` program or any program that can generate
the current date and time on its standard output.
``DOT`` (configured)
Specifies the path to the ``dot`` tool or ``false`` if there isn't one.
``ECHO`` (configured)
Specifies the path to the ``echo`` tool for printing output.
``EXEEXT`` (configured)
Provides the extension to be used on executables built by the makefiles.
The value may be empty on platforms that do not use file extensions for
executables (e.g. Unix).
``INSTALL`` (configured)
Specifies the path to the ``install`` tool.
``LDFLAGS`` (configured)
Allows users to specify additional flags to pass to the linker.
``LIBS`` (configured)
The list of libraries that should be linked with each tool.
``LIBTOOL`` (configured)
Specifies the path to the ``libtool`` tool. This tool is renamed ``mklib``
by the ``configure`` script.
``LLVMAS`` (defaulted)
Specifies the path to the ``llvm-as`` tool.
``LLVMGCC`` (defaulted)
Specifies the path to the LLVM version of the GCC 'C' Compiler.
``LLVMGXX`` (defaulted)
Specifies the path to the LLVM version of the GCC C++ Compiler.
``LLVMLD`` (defaulted)
Specifies the path to the LLVM bitcode linker tool
``LLVM_OBJ_ROOT`` (configured)
Specifies the top directory into which the output of the build is placed.
``LLVM_SRC_ROOT`` (configured)
Specifies the top directory in which the sources are found.
``LLVM_TARBALL_NAME`` (configured)
Specifies the name of the distribution tarball to create. This is configured
from the name of the project and its version number.
``MKDIR`` (defaulted)
Specifies the path to the ``mkdir`` tool that creates directories.
``ONLY_TOOLS``
If set, specifies the list of tools to build.
``PLATFORMSTRIPOPTS``
The options to provide to the linker to specify that a stripped (no symbols)
executable should be built.
``RANLIB`` (defaulted)
Specifies the path to the ``ranlib`` tool.
``RM`` (defaulted)
Specifies the path to the ``rm`` tool.
``SED`` (defaulted)
Specifies the path to the ``sed`` tool.
``SHLIBEXT`` (configured)
Provides the filename extension to use for shared libraries.
``TBLGEN`` (defaulted)
Specifies the path to the ``tblgen`` tool.
``TAR`` (defaulted)
Specifies the path to the ``tar`` tool.
``ZIP`` (defaulted)
Specifies the path to the ``zip`` tool.
Readable Variables
------------------
Variables listed in the table below can be used by the user's Makefile but
should not be changed. Changing the value will generally cause the build to go
wrong, so don't do it.
``bindir``
The directory into which executables will ultimately be installed. This
value is derived from the ``--prefix`` option given to ``configure``.
``BuildMode``
The name of the type of build being performed: Debug, Release, or
Profile.
``bytecode_libdir``
The directory into which bitcode libraries will ultimately be installed.
This value is derived from the ``--prefix`` option given to ``configure``.
``ConfigureScriptFLAGS``
Additional flags given to the ``configure`` script when reconfiguring.
``DistDir``
The *current* directory for which a distribution copy is being made.
.. _Echo:
``Echo``
The LLVM Makefile System output command. This provides the ``llvm[n]``
prefix and starts with ``@`` so the command itself is not printed by
``make``.
``EchoCmd``
Same as `Echo`_ but without the leading ``@``.
``includedir``
The directory into which include files will ultimately be installed. This
value is derived from the ``--prefix`` option given to ``configure``.
``libdir``
The directory into which native libraries will ultimately be installed.
This value is derived from the ``--prefix`` option given to
``configure``.
``LibDir``
The configuration specific directory into which libraries are placed before
installation.
``MakefileConfig``
Full path of the ``Makefile.config`` file.
``MakefileConfigIn``
Full path of the ``Makefile.config.in`` file.
``ObjDir``
The configuration and directory specific directory where build objects
(compilation results) are placed.
``SubDirs``
The complete list of sub-directories of the current directory as
specified by other variables.
``Sources``
The complete list of source files.
``sysconfdir``
The directory into which configuration files will ultimately be
installed. This value is derived from the ``--prefix`` option given to
``configure``.
``ToolDir``
The configuration specific directory into which executables are placed
before they are installed.
``TopDistDir``
The top most directory into which the distribution files are copied.
``Verb``
Use this as the first thing on your build script lines to enable or disable
verbose mode. It expands to either an ``@`` (quiet mode) or nothing (verbose
mode).
Internal Variables
------------------
Variables listed below are used by the LLVM Makefile System and considered
internal. You should not use these variables under any circumstances.
.. code-block:: makefile
Archive
AR.Flags
BaseNameSources
BCLinkLib
C.Flags
Compile.C
CompileCommonOpts
Compile.CXX
ConfigStatusScript
ConfigureScript
CPP.Flags
CPP.Flags
CXX.Flags
DependFiles
DestArchiveLib
DestBitcodeLib
DestModule
DestSharedLib
DestTool
DistAlways
DistCheckDir
DistCheckTop
DistFiles
DistName
DistOther
DistSources
DistSubDirs
DistTarBZ2
DistTarGZip
DistZip
ExtraLibs
FakeSources
INCFiles
InternalTargets
LD.Flags
LibName.A
LibName.BC
LibName.LA
LibName.O
LibTool.Flags
Link
LinkModule
LLVMLibDir
LLVMLibsOptions
LLVMLibsPaths
LLVMToolDir
LLVMUsedLibs
LocalTargets
Module
ObjectsLO
ObjectsO
ObjMakefiles
ParallelTargets
PreConditions
ProjLibsOptions
ProjLibsPaths
ProjUsedLibs
Ranlib
RecursiveTargets
SrcMakefiles
Strip
StripWarnMsg
TableGen
TDFiles
ToolBuildPath
TopLevelTargets
UserTargets

View File

@ -1,15 +0,0 @@
##===- examples/BrainF/Makefile ----------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = BrainF
EXAMPLE_TOOL = 1
LINK_COMPONENTS := mcjit bitwriter nativecodegen interpreter
include $(LEVEL)/Makefile.common

View File

@ -1,16 +0,0 @@
##===- examples/ExceptionDemo/Makefile --------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===---------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = ExceptionDemo
EXAMPLE_TOOL = 1
REQUIRES_EH = 1
LINK_COMPONENTS := mcjit nativecodegen
include $(LEVEL)/Makefile.common

View File

@ -1,17 +0,0 @@
##===- examples/Fibonacci/Makefile -------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = Fibonacci
EXAMPLE_TOOL = 1
# Link in JIT support
LINK_COMPONENTS := interpreter mcjit nativecodegen
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- examples/HowToUseJIT/Makefile -----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = HowToUseJIT
EXAMPLE_TOOL = 1
LINK_COMPONENTS := mcjit interpreter nativecodegen
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- examples/Kaleidoscope/Chapter2/Makefile -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
TOOLNAME = Kaleidoscope-Ch2
EXAMPLE_TOOL = 1
LLVM_CXXFLAGS := -Wno-unused-private-field
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- examples/Kaleidoscope/Chapter3/Makefile -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
TOOLNAME = Kaleidoscope-Ch3
EXAMPLE_TOOL = 1
LINK_COMPONENTS := core
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- examples/Kaleidoscope/Chapter4/Makefile -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
TOOLNAME = Kaleidoscope-Ch4
EXAMPLE_TOOL = 1
LINK_COMPONENTS := core mcjit native
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- examples/Kaleidoscope/Chapter5/Makefile -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
TOOLNAME = Kaleidoscope-Ch5
EXAMPLE_TOOL = 1
LINK_COMPONENTS := core mcjit native
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- examples/Kaleidoscope/Chapter6/Makefile -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
TOOLNAME = Kaleidoscope-Ch6
EXAMPLE_TOOL = 1
LINK_COMPONENTS := core mcjit native
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- examples/Kaleidoscope/Chapter7/Makefile -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
TOOLNAME = Kaleidoscope-Ch7
EXAMPLE_TOOL = 1
LINK_COMPONENTS := core mcjit native
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- examples/Kaleidoscope/Chapter7/Makefile -------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
TOOLNAME = Kaleidoscope-Ch8
EXAMPLE_TOOL = 1
LINK_COMPONENTS := core mcjit native
include $(LEVEL)/Makefile.common

View File

@ -1,11 +0,0 @@
all: toy-mcjit toy-jit toy-ir-gen
toy-mcjit : toy.cpp
clang++ toy.cpp -g -O3 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --libs core mcjit native irreader` -o toy-mcjit
toy-jit : toy-jit.cpp
clang++ toy-jit.cpp -g -O3 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --libs core jit native irreader` -o toy-jit
# This is a special build for the purpose of converting Kaleidoscope input to an IR file
toy-ir-gen : toy-jit.cpp
clang++ toy-jit.cpp -g -O3 -rdynamic -fno-rtti -DDUMP_FINAL_MODULE `llvm-config --cppflags --ldflags --libs core jit native irreader` -o toy-ir-gen

View File

@ -1,4 +0,0 @@
all: toy
toy : toy.cpp
clang++ toy.cpp -g -O3 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --libs core jit mcjit native irreader` -o toy

View File

@ -1,4 +0,0 @@
all: toy-mcjit
toy-mcjit : toy.cpp
clang++ toy.cpp -g -O3 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --libs core mcjit native` -o toy-mcjit

View File

@ -1,7 +0,0 @@
all: toy-mcjit toy-jit
toy-mcjit : toy.cpp
clang++ toy.cpp -g -O3 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --libs core mcjit native` -o toy-mcjit
toy-jit : toy-jit.cpp
clang++ toy-jit.cpp -g -O3 -rdynamic `llvm-config --cppflags --ldflags --libs core jit native` -o toy-jit

View File

@ -1,15 +0,0 @@
##===- examples/Kaleidoscope/Makefile ----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL=../..
include $(LEVEL)/Makefile.config
PARALLEL_DIRS:= Chapter2 Chapter3 Chapter4 Chapter5 Chapter6 Chapter7 Chapter8
include $(LEVEL)/Makefile.common

View File

@ -1,17 +0,0 @@
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
CXX := xcrun --sdk macosx clang++
else
CXX := clang++
endif
LLVM_CXXFLAGS := $(shell llvm-config --cxxflags)
LLVM_LDFLAGS := $(shell llvm-config --ldflags --system-libs --libs core orcjit native)
toy: toy.cpp
$(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++11 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp $(LLVM_LDFLAGS)
.PHONY: clean
clean:
rm -f toy

View File

@ -1,17 +0,0 @@
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
CXX := xcrun --sdk macosx clang++
else
CXX := clang++
endif
LLVM_CXXFLAGS := $(shell llvm-config --cxxflags)
LLVM_LDFLAGS := $(shell llvm-config --ldflags --system-libs --libs core orcjit native)
toy: toy.cpp
$(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++11 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp $(LLVM_LDFLAGS)
.PHONY: clean
clean:
rm -f toy

View File

@ -1,17 +0,0 @@
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
CXX := xcrun --sdk macosx clang++
else
CXX := clang++
endif
LLVM_CXXFLAGS := $(shell llvm-config --cxxflags)
LLVM_LDFLAGS := $(shell llvm-config --ldflags --system-libs --libs core orcjit native)
toy: toy.cpp
$(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++11 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp $(LLVM_LDFLAGS)
.PHONY: clean
clean:
rm -f toy

View File

@ -1,17 +0,0 @@
UNAME := $(shell uname -s)
ifeq ($(UNAME),Darwin)
CXX := xcrun --sdk macosx clang++
else
CXX := clang++
endif
LLVM_CXXFLAGS := $(shell llvm-config --cxxflags)
LLVM_LDFLAGS := $(shell llvm-config --ldflags --system-libs --libs core orcjit native)
toy: toy.cpp
$(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++11 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp $(LLVM_LDFLAGS)
.PHONY: clean
clean:
rm -f toy

View File

@ -1,32 +0,0 @@
##===- examples/Makefile -----------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL=..
include $(LEVEL)/Makefile.config
PARALLEL_DIRS:= BrainF Fibonacci HowToUseJIT Kaleidoscope ModuleMaker
ifeq ($(HAVE_PTHREAD),1)
PARALLEL_DIRS += ParallelJIT
endif
ifeq ($(LLVM_ON_UNIX),1)
ifeq ($(ARCH),x86)
PARALLEL_DIRS += ExceptionDemo
endif
ifeq ($(ARCH),x86_64)
PARALLEL_DIRS += ExceptionDemo
endif
endif
ifeq ($(filter $(BINDINGS_TO_BUILD),ocaml),ocaml)
PARALLEL_DIRS += OCaml-Kaleidoscope
endif
include $(LEVEL)/Makefile.common

View File

@ -1,14 +0,0 @@
##===- examples/ModuleMaker/Makefile -----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL=../..
TOOLNAME=ModuleMaker
EXAMPLE_TOOL = 1
LINK_COMPONENTS := bitwriter
include $(LEVEL)/Makefile.common

View File

@ -1,22 +0,0 @@
##===- examples/OCaml-Kaleidoscope/Chapter2/Makefile -------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml kaleidoscope tutorial, chapter 2.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
TOOLNAME := OCaml-Kaleidoscope-Ch2
EXAMPLE_TOOL := 1
UsedComponents := core
UsedOcamLibs := llvm
OCAMLCFLAGS += -pp camlp4of
include $(LEVEL)/bindings/ocaml/Makefile.ocaml

View File

@ -1,24 +0,0 @@
##===- examples/OCaml-Kaleidoscope/Chapter3/Makefile -------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml kaleidoscope tutorial, chapter 3.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
TOOLNAME := OCaml-Kaleidoscope-Ch3
EXAMPLE_TOOL := 1
UsedComponents := core
UsedOcamLibs := llvm llvm_analysis
OCAMLCFLAGS += -pp camlp4of
ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml
include $(LEVEL)/bindings/ocaml/Makefile.ocaml

View File

@ -1,25 +0,0 @@
##===- examples/OCaml-Kaleidoscope/Chapter4/Makefile -------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml kaleidoscope tutorial, chapter 4.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
TOOLNAME := OCaml-Kaleidoscope-Ch4
EXAMPLE_TOOL := 1
UsedComponents := core
UsedOcamLibs := llvm llvm_analysis llvm_executionengine llvm_target \
llvm_scalar_opts
OCAMLCFLAGS += -pp camlp4of
ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml
include $(LEVEL)/bindings/ocaml/Makefile.ocaml

View File

@ -1,25 +0,0 @@
##===- examples/OCaml-Kaleidoscope/Chapter5/Makefile -------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml kaleidoscope tutorial, chapter 5.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
TOOLNAME := OCaml-Kaleidoscope-Ch5
EXAMPLE_TOOL := 1
UsedComponents := core
UsedOcamLibs := llvm llvm_analysis llvm_executionengine llvm_target \
llvm_scalar_opts
OCAMLCFLAGS += -pp camlp4of
ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml
include $(LEVEL)/bindings/ocaml/Makefile.ocaml

View File

@ -1,34 +0,0 @@
##===- examples/OCaml-Kaleidoscope/Chapter6/Makefile -------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml kaleidoscope tutorial, chapter 6.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
TOOLNAME := OCaml-Kaleidoscope-Ch6
EXAMPLE_TOOL := 1
UsedComponents := core
UsedOcamLibs := llvm llvm_analysis llvm_executionengine llvm_target \
llvm_scalar_opts
OCAMLCFLAGS += -pp camlp4of
OcamlSources1 = \
$(PROJ_SRC_DIR)/ast.ml \
$(PROJ_SRC_DIR)/parser.ml \
$(PROJ_SRC_DIR)/codegen.ml \
$(PROJ_SRC_DIR)/lexer.ml \
$(PROJ_SRC_DIR)/token.ml \
$(PROJ_SRC_DIR)/toplevel.ml \
$(PROJ_SRC_DIR)/toy.ml
ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml
include $(LEVEL)/bindings/ocaml/Makefile.ocaml

View File

@ -1,34 +0,0 @@
##===- examples/OCaml-Kaleidoscope/Chapter7/Makefile -------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
#
# This is the makefile for the Objective Caml kaleidoscope tutorial, chapter 7.
#
##===----------------------------------------------------------------------===##
LEVEL := ../../..
TOOLNAME := OCaml-Kaleidoscope-Ch7
EXAMPLE_TOOL := 1
UsedComponents := core
UsedOcamLibs := llvm llvm_analysis llvm_executionengine llvm_target \
llvm_scalar_opts
OCAMLCFLAGS += -pp camlp4of
OcamlSources1 = \
$(PROJ_SRC_DIR)/ast.ml \
$(PROJ_SRC_DIR)/parser.ml \
$(PROJ_SRC_DIR)/codegen.ml \
$(PROJ_SRC_DIR)/lexer.ml \
$(PROJ_SRC_DIR)/token.ml \
$(PROJ_SRC_DIR)/toplevel.ml \
$(PROJ_SRC_DIR)/toy.ml
ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml
include $(LEVEL)/bindings/ocaml/Makefile.ocaml

View File

@ -1,15 +0,0 @@
##===- examples/OCaml-Kaleidoscope/Makefile ----------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL=../..
include $(LEVEL)/Makefile.config
PARALLEL_DIRS:= Chapter2 Chapter3 Chapter4 Chapter5 Chapter6 Chapter7
include $(LEVEL)/Makefile.common

View File

@ -1,17 +0,0 @@
##===- examples/ParallelJIT/Makefile -----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = ParallelJIT
EXAMPLE_TOOL = 1
LINK_COMPONENTS := mcjit interpreter nativecodegen
include $(LEVEL)/Makefile.common
LIBS += -lpthread

View File

@ -1,15 +0,0 @@
##===- lib/Analysis/Makefile -------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
LIBRARYNAME = LLVMAnalysis
BUILD_ARCHIVE = 1
include $(LEVEL)/Makefile.common

View File

@ -1,14 +0,0 @@
##===- lib/AsmParser/Makefile ------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
LIBRARYNAME := LLVMAsmParser
BUILD_ARCHIVE = 1
include $(LEVEL)/Makefile.common

View File

@ -1,14 +0,0 @@
##===- lib/Bitcode/Makefile --------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
PARALLEL_DIRS = Reader Writer
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- lib/Bitcode/Reader/Makefile -------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
LIBRARYNAME = LLVMBitReader
BUILD_ARCHIVE = 1
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- lib/Bitcode/Reader/Makefile -------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
LIBRARYNAME = LLVMBitWriter
BUILD_ARCHIVE = 1
include $(LEVEL)/Makefile.common

View File

@ -1,13 +0,0 @@
##===- lib/CodeGen/AsmPrinter/Makefile ---------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
LIBRARYNAME = LLVMAsmPrinter
include $(LEVEL)/Makefile.common

View File

@ -1,13 +0,0 @@
##===- lib/CodeGen/MIRParser/Makefile ----------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
LIBRARYNAME = LLVMMIRParser
include $(LEVEL)/Makefile.common

View File

@ -1,22 +0,0 @@
##===- lib/CodeGen/Makefile --------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
LIBRARYNAME = LLVMCodeGen
PARALLEL_DIRS = SelectionDAG AsmPrinter MIRParser
BUILD_ARCHIVE = 1
include $(LEVEL)/Makefile.common
# Xcode prior to 2.4 generates an error in -pedantic mode with use of HUGE_VAL
# in this directory. Disable -pedantic for this broken compiler.
ifneq ($(HUGE_VAL_SANITY),yes)
CompileCommonOpts := $(filter-out -pedantic, $(CompileCommonOpts))
endif

View File

@ -1,13 +0,0 @@
##===- lib/CodeGen/SelectionDAG/Makefile -------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
LIBRARYNAME = LLVMSelectionDAG
include $(LEVEL)/Makefile.common

View File

@ -1,14 +0,0 @@
##===- lib/DebugInfo/CodeView/Makefile ---------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
LIBRARYNAME = LLVMDebugInfoCodeView
BUILD_ARCHIVE := 1
include $(LEVEL)/Makefile.common

View File

@ -1,14 +0,0 @@
##===- lib/DebugInfo/DWARF/Makefile ------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
LIBRARYNAME = LLVMDebugInfoDWARF
BUILD_ARCHIVE := 1
include $(LEVEL)/Makefile.common

View File

@ -1,15 +0,0 @@
##===- lib/DebugInfo/Makefile ------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
include $(LEVEL)/Makefile.config
PARALLEL_DIRS := CodeView DWARF PDB Symbolize
include $(LEVEL)/Makefile.common

Some files were not shown because too many files have changed in this diff Show More