forked from OSchip/llvm-project
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 "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
This commit is contained in:
parent
e49730d4ba
commit
2bf68c6c1c
124
clang/Makefile
124
clang/Makefile
|
@ -1,124 +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.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
# If CLANG_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
|
||||
# are being included from a subdirectory makefile.
|
||||
|
||||
ifndef CLANG_LEVEL
|
||||
|
||||
IS_TOP_LEVEL := 1
|
||||
CLANG_LEVEL := .
|
||||
DIRS := utils/TableGen include lib tools runtime docs unittests
|
||||
|
||||
PARALLEL_DIRS :=
|
||||
|
||||
ifeq ($(BUILD_EXAMPLES),1)
|
||||
PARALLEL_DIRS += examples
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_EXAMPLES),1)
|
||||
ENABLE_CLANG_EXAMPLES := 1
|
||||
else
|
||||
ENABLE_CLANG_EXAMPLES := 0
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),libs-only)
|
||||
DIRS := $(filter-out tools docs, $(DIRS))
|
||||
OPTIONAL_DIRS :=
|
||||
endif
|
||||
ifeq ($(BUILD_CLANG_ONLY),YES)
|
||||
DIRS := $(filter-out docs unittests, $(DIRS))
|
||||
OPTIONAL_DIRS :=
|
||||
endif
|
||||
|
||||
###
|
||||
# Common Makefile code, shared by all Clang Makefiles.
|
||||
|
||||
# Set LLVM source root level.
|
||||
LEVEL := $(CLANG_LEVEL)/../..
|
||||
|
||||
# Include LLVM common makefile.
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
||||
ifneq ($(ENABLE_DOCS),1)
|
||||
DIRS := $(filter-out docs, $(DIRS))
|
||||
endif
|
||||
|
||||
# Set common Clang build flags.
|
||||
CPP.Flags += -I$(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include
|
||||
ifdef CLANG_VENDOR
|
||||
CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
|
||||
endif
|
||||
ifdef CLANG_REPOSITORY_STRING
|
||||
CPP.Flags += -DCLANG_REPOSITORY_STRING='"$(CLANG_REPOSITORY_STRING)"'
|
||||
endif
|
||||
|
||||
# Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
|
||||
# work with it enabled with GCC), Clang/llvm-gcc don't support it yet, and newer
|
||||
# GCC's have false positive warnings with it on Linux (which prove a pain to
|
||||
# fix). For example:
|
||||
# http://gcc.gnu.org/PR41874
|
||||
# http://gcc.gnu.org/PR41838
|
||||
#
|
||||
# We don't need to do this if the host compiler is clang.
|
||||
ifneq ($(CXX_COMPILER), "clang")
|
||||
CXX.Flags += -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
|
||||
# Set up Clang's tblgen.
|
||||
ifndef CLANG_TBLGEN
|
||||
ifeq ($(LLVM_CROSS_COMPILING),1)
|
||||
CLANG_TBLGEN := $(BuildLLVMToolDir)/clang-tblgen$(BUILD_EXEEXT)
|
||||
else
|
||||
CLANG_TBLGEN := $(LLVMToolDir)/clang-tblgen$(EXEEXT)
|
||||
endif
|
||||
endif
|
||||
ClangTableGen = $(CLANG_TBLGEN) $(TableGen.Flags)
|
||||
|
||||
###
|
||||
# Clang Top Level specific stuff.
|
||||
|
||||
ifeq ($(IS_TOP_LEVEL),1)
|
||||
|
||||
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
|
||||
$(RecursiveTargets)::
|
||||
$(Verb) for dir in test unittests; do \
|
||||
if [ -f $(PROJ_SRC_DIR)/$${dir}/Makefile ] && [ ! -f $${dir}/Makefile ]; then \
|
||||
$(MKDIR) $${dir}; \
|
||||
$(CP) $(PROJ_SRC_DIR)/$${dir}/Makefile $${dir}/Makefile; \
|
||||
fi \
|
||||
done
|
||||
endif
|
||||
|
||||
test::
|
||||
@ $(MAKE) -C test
|
||||
|
||||
report::
|
||||
@ $(MAKE) -C test report
|
||||
|
||||
clean::
|
||||
@ $(MAKE) -C test clean
|
||||
|
||||
libs-only: all
|
||||
|
||||
tags::
|
||||
$(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
|
||||
grep -v /lib/Headers | grep -v /test/`
|
||||
|
||||
cscope.files:
|
||||
find tools lib include -name '*.cpp' \
|
||||
-or -name '*.def' \
|
||||
-or -name '*.td' \
|
||||
-or -name '*.h' > cscope.files
|
||||
|
||||
.PHONY: test report clean cscope.files
|
||||
|
||||
endif
|
|
@ -1,110 +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.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ..
|
||||
|
||||
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_builddir@/./g' \
|
||||
-e 's/@abs_srcdir@/./g' \
|
||||
-e 's/@clang_doxygen_generate_qhp@/NO/g' \
|
||||
-e 's/@clang_doxygen_qch_filename@//g' \
|
||||
-e 's/@clang_doxygen_qhelpgenerator_path@//g' \
|
||||
-e 's/@clang_doxygen_qhp_cust_filter_attrs@//g' \
|
||||
-e 's/@clang_doxygen_qhp_cust_filter_name@//g' \
|
||||
-e 's/@clang_doxygen_qhp_namespace@//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/@searchengine_url@//g' \
|
||||
-e 's/@DOT_IMAGE_FORMAT@/png/g' \
|
||||
> $@
|
||||
endif
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
HTML := $(wildcard $(PROJ_SRC_DIR)/*.html) \
|
||||
$(wildcard $(PROJ_SRC_DIR)/*.css)
|
||||
#IMAGES := $(wildcard $(PROJ_SRC_DIR)/img/*.*)
|
||||
DOXYFILES := doxygen.cfg.in doxygen.intro
|
||||
|
||||
.PHONY: install-html install-doxygen doxygen generated
|
||||
|
||||
install_targets :=
|
||||
ifndef ONLY_MAN_DOCS
|
||||
install_targets += install-html
|
||||
endif
|
||||
ifeq ($(ENABLE_DOXYGEN),1)
|
||||
install_targets += install-doxygen
|
||||
endif
|
||||
install-local:: $(install_targets)
|
||||
|
||||
# Live documentation is generated for the web site using this target:
|
||||
# 'make generated BUILD_FOR_WEBSITE=1'
|
||||
generated:: doxygen
|
||||
|
||||
install-html: $(PROJ_OBJ_DIR)/html.tar.gz
|
||||
$(Echo) Installing HTML documentation
|
||||
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html
|
||||
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img
|
||||
$(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html
|
||||
# $(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img
|
||||
$(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
|
||||
$(Verb) sed -i "s/[$$]LatestRev[$$]/`svnversion $(PROJ_SRC_DIR)`/g" \
|
||||
$(PROJ_OBJ_DIR)/doxygen/html/*.html
|
||||
|
||||
$(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
|
||||
|
||||
uninstall-local::
|
||||
$(Echo) Uninstalling Documentation
|
||||
$(Verb) $(RM) -rf $(DESTDIR)$(PROJ_docsdir)
|
|
@ -1,163 +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 default
|
||||
|
||||
default: 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
|
||||
@# FIXME: Remove this `cp` once HTML->Sphinx transition is completed.
|
||||
@# Kind of a hack, but HTML-formatted docs are on the way out anyway.
|
||||
@echo "Copying legacy HTML-formatted docs into $(BUILDDIR)/html"
|
||||
@cp -a *.html $(BUILDDIR)/html
|
||||
@# FIXME: What we really need is a way to specify redirects, so that
|
||||
@# we can just redirect to a reST'ified version of this document.
|
||||
@# PR14714 is tracking the issue of redirects.
|
||||
@cp -a Block-ABI-Apple.txt $(BUILDDIR)/html
|
||||
@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/Clang.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Clang.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/Clang"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Clang"
|
||||
@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."
|
|
@ -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
|
||||
|
||||
default: 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/ClangStaticAnalyzer.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ClangStaticAnalyzer.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/ClangStaticAnalyzer"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ClangStaticAnalyzer"
|
||||
@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."
|
|
@ -1,14 +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.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ..
|
||||
|
||||
PARALLEL_DIRS := analyzer-plugin clang-interpreter PrintFunctionNames
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,28 +0,0 @@
|
|||
##===- examples/PrintFunctionNames/Makefile ----------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME = PrintFunctionNames
|
||||
|
||||
# If we don't need RTTI or EH, there's no reason to export anything
|
||||
# from the plugin.
|
||||
ifneq ($(REQUIRES_RTTI), 1)
|
||||
ifneq ($(REQUIRES_EH), 1)
|
||||
EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/PrintFunctionNames.exports
|
||||
endif
|
||||
endif
|
||||
|
||||
LINK_LIBS_IN_SHARED = 0
|
||||
LOADABLE_MODULE = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
LDFLAGS=-Wl,-undefined,dynamic_lookup
|
||||
endif
|
|
@ -1,20 +0,0 @@
|
|||
##===- examples/analyzer-plugin/Makefile -------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME = SampleAnalyzerPlugin
|
||||
|
||||
LINK_LIBS_IN_SHARED = 0
|
||||
LOADABLE_MODULE = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
LDFLAGS=-Wl,-undefined,dynamic_lookup
|
||||
endif
|
|
@ -1,28 +0,0 @@
|
|||
##===- examples/clang-interpreter/Makefile -----------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
TOOLNAME = clang-interpreter
|
||||
NO_INSTALL = 1
|
||||
|
||||
# No plugins, optimize startup time.
|
||||
TOOL_NO_EXPORTS = 1
|
||||
|
||||
LINK_COMPONENTS := mcjit interpreter nativecodegen bitreader bitwriter irreader \
|
||||
ipo linker selectiondag asmparser instrumentation objcarcopts option
|
||||
USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a clangCodeGen.a \
|
||||
clangParse.a clangSema.a clangStaticAnalyzerFrontend.a \
|
||||
clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
|
||||
clangAnalysis.a clangRewrite.a clangRewriteFrontend.a \
|
||||
clangEdit.a clangAST.a clangLex.a clangBasic.a LLVMCore.a \
|
||||
LLVMExecutionEngine.a LLVMMC.a LLVMMCJIT.a LLVMRuntimeDyld.a \
|
||||
LLVMObject.a LLVMSupport.a LLVMProfileData.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,4 +0,0 @@
|
|||
CLANG_LEVEL := ..
|
||||
DIRS := clang clang-c
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,38 +0,0 @@
|
|||
CLANG_LEVEL := ../..
|
||||
DIRS :=
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
IntIncludeDir = $(DESTDIR)$(PROJ_internal_prefix)/include
|
||||
|
||||
install-local::
|
||||
$(Echo) Installing Clang C API include files
|
||||
$(Verb) $(MKDIR) $(IntIncludeDir)
|
||||
$(Verb) if test -d "$(PROJ_SRC_DIR)" ; then \
|
||||
cd $(PROJ_SRC_DIR)/.. && \
|
||||
for hdr in `find clang-c -type f '!' '(' -name '*~' \
|
||||
-o -name '.#*' -o -name '*.in' -o -name '*.txt' \
|
||||
-o -name 'Makefile' -o -name '*.td' ')' -print \
|
||||
| grep -v CVS | grep -v .svn | grep -v .dir` ; do \
|
||||
instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \
|
||||
if test \! -d "$$instdir" ; then \
|
||||
$(EchoCmd) Making install directory $$instdir ; \
|
||||
$(MKDIR) $$instdir ;\
|
||||
fi ; \
|
||||
$(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \
|
||||
done ; \
|
||||
fi
|
||||
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
|
||||
$(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include/clang-c" ; then \
|
||||
cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
|
||||
for hdr in `find clang-c -type f '!' '(' -name 'Makefile' ')' -print \
|
||||
| grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
|
||||
instdir=`dirname "$(IntIncludeDir)/$$hdr"` ; \
|
||||
if test \! -d "$$instdir" ; then \
|
||||
$(EchoCmd) Making install directory $$instdir ; \
|
||||
$(MKDIR) $$instdir ;\
|
||||
fi ; \
|
||||
$(DataInstall) $$hdr $(IntIncludeDir)/$$hdr ; \
|
||||
done ; \
|
||||
fi
|
||||
endif
|
|
@ -1,79 +0,0 @@
|
|||
CLANG_LEVEL := ../../..
|
||||
TD_SRC_DIR = $(PROJ_SRC_DIR)/../Basic
|
||||
BUILT_SOURCES = Attrs.inc AttrImpl.inc AttrDump.inc AttrVisitor.inc \
|
||||
StmtNodes.inc DeclNodes.inc \
|
||||
CommentNodes.inc CommentHTMLTags.inc \
|
||||
CommentHTMLTagsProperties.inc \
|
||||
CommentHTMLNamedCharacterReferences.inc \
|
||||
CommentCommandInfo.inc \
|
||||
CommentCommandList.inc
|
||||
|
||||
TABLEGEN_INC_FILES_COMMON = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
$(ObjDir)/Attrs.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang attribute classes with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-classes -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/AttrImpl.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang attribute implementations with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-impl -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/AttrDump.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang attribute dumper with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-dump -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/AttrVisitor.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang attribute AST visitor with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-ast-visitor -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/StmtNodes.inc.tmp : $(TD_SRC_DIR)/StmtNodes.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang statement node tables with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-stmt-nodes -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/DeclNodes.inc.tmp : $(TD_SRC_DIR)/DeclNodes.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang declaration node tables with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-decl-nodes -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/CommentNodes.inc.tmp : $(TD_SRC_DIR)/CommentNodes.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang comment node tables with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-comment-nodes -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/CommentHTMLTags.inc.tmp : $(PROJ_SRC_DIR)/CommentHTMLTags.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang comment HTML tag matchers with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-comment-html-tags -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/CommentHTMLTagsProperties.inc.tmp : $(PROJ_SRC_DIR)/CommentHTMLTags.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang comment HTML tag properties with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-comment-html-tags-properties -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/CommentHTMLNamedCharacterReferences.inc.tmp : \
|
||||
$(PROJ_SRC_DIR)/CommentHTMLNamedCharacterReferences.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang named character reference translation function with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-comment-html-named-character-references -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/CommentCommandInfo.inc.tmp : $(PROJ_SRC_DIR)/CommentCommands.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang comment command info with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-comment-command-info -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/CommentCommandList.inc.tmp : $(PROJ_SRC_DIR)/CommentCommands.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang list of comment commands with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-comment-command-list -o $(call SYSPATH, $@) $<
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
CLANG_LEVEL := ../../..
|
||||
BUILT_SOURCES = \
|
||||
DiagnosticAnalysisKinds.inc DiagnosticASTKinds.inc \
|
||||
DiagnosticCommentKinds.inc \
|
||||
DiagnosticCommonKinds.inc DiagnosticDriverKinds.inc \
|
||||
DiagnosticFrontendKinds.inc DiagnosticLexKinds.inc \
|
||||
DiagnosticParseKinds.inc DiagnosticSemaKinds.inc \
|
||||
DiagnosticSerializationKinds.inc \
|
||||
AttrHasAttributeImpl.inc \
|
||||
DiagnosticIndexName.inc DiagnosticGroups.inc AttrList.inc arm_neon.inc \
|
||||
Version.inc
|
||||
|
||||
TABLEGEN_INC_FILES_COMMON = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
INPUT_TDS = $(wildcard $(PROJ_SRC_DIR)/Diagnostic*.td)
|
||||
|
||||
# Compute the Clang version from the LLVM version, unless specified explicitly.
|
||||
ifndef CLANG_VERSION
|
||||
CLANG_VERSION := $(subst svn,,$(LLVMVersion))
|
||||
CLANG_VERSION := $(subst rc,,$(CLANG_VERSION))
|
||||
endif
|
||||
|
||||
CLANG_VERSION_COMPONENTS := $(subst ., ,$(CLANG_VERSION))
|
||||
CLANG_VERSION_MAJOR := $(word 1,$(CLANG_VERSION_COMPONENTS))
|
||||
CLANG_VERSION_MINOR := $(word 2,$(CLANG_VERSION_COMPONENTS))
|
||||
CLANG_VERSION_PATCHLEVEL := $(word 3,$(CLANG_VERSION_COMPONENTS))
|
||||
ifeq ($(CLANG_VERSION_PATCHLEVEL),)
|
||||
CLANG_HAS_VERSION_PATCHLEVEL := 0
|
||||
else
|
||||
CLANG_HAS_VERSION_PATCHLEVEL := 1
|
||||
endif
|
||||
|
||||
$(ObjDir)/Diagnostic%Kinds.inc.tmp : Diagnostic.td $(INPUT_TDS) $(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang $(patsubst Diagnostic%Kinds.inc.tmp,%,$(@F)) diagnostic tables with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-diags-defs -clang-component=$(patsubst Diagnostic%Kinds.inc.tmp,%,$(@F)) -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/DiagnosticIndexName.inc.tmp : Diagnostic.td $(INPUT_TDS) $(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang diagnostic name index with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-diags-index-name -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/DiagnosticGroups.inc.tmp : Diagnostic.td DiagnosticGroups.td $(INPUT_TDS) $(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang diagnostic groups with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-diag-groups -o $(call SYSPATH, $@) $<
|
||||
|
||||
$(ObjDir)/AttrList.inc.tmp : Attr.td $(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang attribute list with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-list -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../.. $<
|
||||
|
||||
$(ObjDir)/AttrHasAttributeImpl.inc.tmp : Attr.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang __has_attribute implementation with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-has-attribute-impl -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/arm_neon.inc.tmp : arm_neon.td $(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang arm_neon.inc with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-arm-neon-sema -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../.. $<
|
||||
|
||||
$(ObjDir)/Version.inc.tmp : Version.inc.in Makefile $(LLVM_OBJ_ROOT)/Makefile.config $(ObjDir)/.dir
|
||||
$(Echo) "Updating Clang version info."
|
||||
$(Verb)sed -e "s#@CLANG_VERSION@#$(CLANG_VERSION)#g" \
|
||||
-e "s#@CLANG_VERSION_MAJOR@#$(CLANG_VERSION_MAJOR)#g" \
|
||||
-e "s#@CLANG_VERSION_MINOR@#$(CLANG_VERSION_MINOR)#g" \
|
||||
-e "s#@CLANG_VERSION_PATCHLEVEL@#$(CLANG_VERSION_PATCHLEVEL)#g" \
|
||||
-e "s#@CLANG_HAS_VERSION_PATCHLEVEL@#$(CLANG_HAS_VERSION_PATCHLEVEL)#g" \
|
||||
$< > $@
|
|
@ -1,10 +0,0 @@
|
|||
CLANG_LEVEL := ../../..
|
||||
BUILT_SOURCES = Options.inc
|
||||
|
||||
TABLEGEN_INC_FILES_COMMON = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
$(ObjDir)/Options.inc.tmp : Options.td CC1Options.td CLCompatOptions.td $(LLVM_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang Driver Option tables with tblgen"
|
||||
$(Verb) $(LLVMTableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $<
|
|
@ -1,44 +0,0 @@
|
|||
CLANG_LEVEL := ../..
|
||||
DIRS := AST Basic Driver Parse Sema Serialization
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
install-local::
|
||||
$(Echo) Installing Clang include files
|
||||
$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
|
||||
$(Verb) if test -d "$(PROJ_SRC_DIR)" ; then \
|
||||
cd $(PROJ_SRC_DIR)/.. && \
|
||||
for hdr in `find clang -type f \
|
||||
'(' -name LICENSE.TXT \
|
||||
-o -name '*.def' \
|
||||
-o -name '*.h' \
|
||||
-o -name '*.inc' \
|
||||
')' -print \
|
||||
| grep -v CVS | grep -v .svn | grep -v .dir` ; do \
|
||||
instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
|
||||
if test \! -d "$$instdir" ; then \
|
||||
$(EchoCmd) Making install directory $$instdir ; \
|
||||
$(MKDIR) $$instdir ;\
|
||||
fi ; \
|
||||
$(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
|
||||
done ; \
|
||||
fi
|
||||
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
|
||||
$(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include/clang" ; then \
|
||||
cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
|
||||
for hdr in `find clang -type f \
|
||||
'(' -name LICENSE.TXT \
|
||||
-o -name '*.def' \
|
||||
-o -name '*.h' \
|
||||
-o -name '*.inc' \
|
||||
')' -print \
|
||||
| grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
|
||||
instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
|
||||
if test \! -d "$$instdir" ; then \
|
||||
$(EchoCmd) Making install directory $$instdir ; \
|
||||
$(MKDIR) $$instdir ;\
|
||||
fi ; \
|
||||
$(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
|
||||
done ; \
|
||||
fi
|
||||
endif
|
|
@ -1,13 +0,0 @@
|
|||
CLANG_LEVEL := ../../..
|
||||
TD_SRC_DIR = $(PROJ_SRC_DIR)/../Basic
|
||||
BUILT_SOURCES = AttrParserStringSwitches.inc
|
||||
|
||||
TABLEGEN_INC_FILES_COMMON = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
$(ObjDir)/AttrParserStringSwitches.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang parser-related attribute string switches"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-parser-string-switches -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../../ $<
|
|
@ -1,39 +0,0 @@
|
|||
CLANG_LEVEL := ../../..
|
||||
TD_SRC_DIR = $(PROJ_SRC_DIR)/../Basic
|
||||
BUILT_SOURCES = AttrTemplateInstantiate.inc AttrParsedAttrList.inc AttrParsedAttrKinds.inc \
|
||||
AttrSpellingListIndex.inc AttrParsedAttrImpl.inc
|
||||
|
||||
TABLEGEN_INC_FILES_COMMON = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
$(ObjDir)/AttrTemplateInstantiate.inc.tmp : $(TD_SRC_DIR)/Attr.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang attribute template instantiate code with tablegen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-template-instantiate -o \
|
||||
$(call SYSPATH, $@) -I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/AttrParsedAttrList.inc.tmp : $(TD_SRC_DIR)/Attr.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang parsed attribute list with tablegen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-parsed-attr-list -o \
|
||||
$(call SYSPATH, $@) -I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/AttrParsedAttrKinds.inc.tmp : $(TD_SRC_DIR)/Attr.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang parsed attribute kinds with tablegen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-parsed-attr-kinds -o \
|
||||
$(call SYSPATH, $@) -I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/AttrSpellingListIndex.inc.tmp : $(TD_SRC_DIR)/Attr.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang attribute spelling list index with tablegen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-spelling-index -o \
|
||||
$(call SYSPATH, $@) -I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/AttrParsedAttrImpl.inc.tmp : $(TD_SRC_DIR)/Attr.td \
|
||||
$(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang parsed attribute list impl with tablegen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-parsed-attr-impl -o \
|
||||
$(call SYSPATH, $@) -I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
CLANG_LEVEL := ../../..
|
||||
TD_SRC_DIR = $(PROJ_SRC_DIR)/../Basic
|
||||
BUILT_SOURCES = AttrPCHRead.inc AttrPCHWrite.inc
|
||||
|
||||
TABLEGEN_INC_FILES_COMMON = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
$(ObjDir)/AttrPCHRead.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang PCH reader with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-pch-read -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../../ $<
|
||||
|
||||
$(ObjDir)/AttrPCHWrite.inc.tmp : $(TD_SRC_DIR)/Attr.td $(CLANG_TBLGEN) \
|
||||
$(ObjDir)/.dir
|
||||
$(Echo) "Building Clang PCH writer with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-attr-pch-write -o $(call SYSPATH, $@) \
|
||||
-I $(PROJ_SRC_DIR)/../../ $<
|
|
@ -1,18 +0,0 @@
|
|||
##===- clang/lib/ARCMigrate/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements code transformation to ARC mode.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangARCMigrate
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
##===- clang/lib/AST/Makefile ------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements the AST library for the C-Language front-end.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangAST
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
##===- clang/lib/ASTMatchers/Dynamic/Makefile --------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../../..
|
||||
LIBRARYNAME := clangDynamicASTMatchers
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,15 +0,0 @@
|
|||
##===- clang/lib/ASTMatchers/Makefile ----------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangASTMatchers
|
||||
|
||||
PARALLEL_DIRS = Dynamic
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,18 +0,0 @@
|
|||
##===- clang/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.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements analyses built on top of source-level CFGs.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangAnalysis
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
##===- clang/lib/Basic/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements the Basic library for the C-Language front-end.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangBasic
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
SVN_REVISION := $(strip \
|
||||
$(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..))
|
||||
|
||||
SVN_REPOSITORY := $(strip \
|
||||
$(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(PROJ_SRC_DIR)/../..))
|
||||
|
||||
LLVM_REVISION := $(strip \
|
||||
$(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(LLVM_SRC_ROOT)))
|
||||
|
||||
LLVM_REPOSITORY := $(strip \
|
||||
$(shell $(LLVM_SRC_ROOT)/utils/GetRepositoryPath $(LLVM_SRC_ROOT)))
|
||||
|
||||
CPP.Defines += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include \
|
||||
-DSVN_REVISION='"$(SVN_REVISION)"' -DSVN_REPOSITORY='"$(SVN_REPOSITORY)"' \
|
||||
-DLLVM_REVISION='"$(LLVM_REVISION)"' -DLLVM_REPOSITORY='"$(LLVM_REPOSITORY)"'
|
||||
|
||||
$(ObjDir)/.ver-svn .ver: $(ObjDir)/.dir
|
||||
@if [ '$(SVN_REVISION) $(LLVM_REVISION)' != '$(shell cat $(ObjDir)/.ver-svn 2>/dev/null)' ]; then\
|
||||
echo '$(SVN_REVISION) $(LLVM_REVISION)' > $(ObjDir)/.ver-svn; \
|
||||
fi
|
||||
$(ObjDir)/.ver-svn: .ver
|
||||
$(ObjDir)/Version.o: $(ObjDir)/.ver-svn
|
|
@ -1,19 +0,0 @@
|
|||
##===- clang/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.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements the AST -> LLVM code generation library for the
|
||||
# C-Language front-end.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangCodeGen
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
##===- clang/lib/Driver/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangDriver
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,14 +0,0 @@
|
|||
##===- clang/lib/Edit/Makefile -----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangEdit
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
##===- clang/lib/Format/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangFormat
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,14 +0,0 @@
|
|||
##===- clang/lib/Frontend/Makefile -------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
DIRS := Rewrite
|
||||
LIBRARYNAME := clangFrontend
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,22 +0,0 @@
|
|||
##===- clang/lib/Rewrite/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements code transformation / rewriting facilities.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../../..
|
||||
LIBRARYNAME := clangRewriteFrontend
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
ifeq ($(ENABLE_CLANG_ARCMT),1)
|
||||
CXX.Flags += -DCLANG_ENABLE_OBJC_REWRITER
|
||||
endif
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
##===- clang/lib/FrontendTool/Makefile ---------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangFrontendTool
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
|
||||
ifeq ($(ENABLE_CLANG_ARCMT),1)
|
||||
CXX.Flags += -DCLANG_ENABLE_ARCMT
|
||||
CXX.Flags += -DCLANG_ENABLE_OBJC_REWRITER
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_CLANG_STATIC_ANALYZER),1)
|
||||
CXX.Flags += -DCLANG_ENABLE_STATIC_ANALYZER
|
||||
endif
|
||||
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
##===- clang/lib/Headers/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
BUILT_SOURCES = arm_neon.h.inc
|
||||
TABLEGEN_INC_FILES_COMMON = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
CLANG_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
|
||||
$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
|
||||
|
||||
HeaderDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)/include
|
||||
|
||||
HEADERS := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.h))
|
||||
|
||||
OBJHEADERS := $(addprefix $(HeaderDir)/, $(HEADERS))
|
||||
|
||||
|
||||
$(OBJHEADERS): $(HeaderDir)/%.h: $(PROJ_SRC_DIR)/%.h $(HeaderDir)/.dir $(HeaderDir)/arm_neon.h
|
||||
$(Verb) cp $< $@
|
||||
$(Echo) Copying $(notdir $<) to build dir
|
||||
|
||||
$(HeaderDir)/arm_neon.h: $(BUILT_SOURCES) $(HeaderDir)/.dir
|
||||
$(Verb) cp $< $@
|
||||
$(Echo) Copying $(notdir $<) to build dir
|
||||
|
||||
$(HeaderDir)/module.modulemap: $(PROJ_SRC_DIR)/module.modulemap $(HeaderDir)/.dir
|
||||
$(Verb) cp $< $@
|
||||
$(Echo) Copying $(notdir $<) to build dir
|
||||
|
||||
|
||||
# Hook into the standard Makefile rules.
|
||||
all-local:: $(OBJHEADERS) $(HeaderDir)/module.modulemap
|
||||
|
||||
PROJ_headers := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)/include
|
||||
|
||||
INSTHEADERS := $(addprefix $(PROJ_headers)/, $(HEADERS))
|
||||
INSTHEADERS += $(PROJ_headers)/arm_neon.h
|
||||
|
||||
$(PROJ_headers):
|
||||
$(Verb) $(MKDIR) $@
|
||||
|
||||
$(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers)
|
||||
$(Verb) $(DataInstall) $< $(PROJ_headers)
|
||||
$(Echo) Installing compiler include file: $(notdir $<)
|
||||
|
||||
$(PROJ_headers)/module.modulemap: $(HeaderDir)/module.modulemap | $(PROJ_headers)
|
||||
$(Verb) $(DataInstall) $< $(PROJ_headers)
|
||||
$(Echo) Installing compiler module map file: $(notdir $<)
|
||||
|
||||
|
||||
install-local:: $(INSTHEADERS) $(PROJ_headers)/module.modulemap
|
||||
|
||||
$(ObjDir)/arm_neon.h.inc.tmp : $(CLANG_LEVEL)/include/clang/Basic/arm_neon.td $(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang arm_neon.h.inc with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-arm-neon -o $(call SYSPATH, $@) $<
|
|
@ -1,13 +0,0 @@
|
|||
##===- clang/lib/Index/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangIndex
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,24 +0,0 @@
|
|||
##===- clang/lib/Lex/Makefile ------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements the Lexer library for the C-Language front-end.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
|
||||
LIBRARYNAME := clangLex
|
||||
|
||||
ifeq ($(ARCH),PowerPC)
|
||||
CXX.Flags += -maltivec
|
||||
endif
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
##===- lib/Makefile ----------------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
CLANG_LEVEL := ..
|
||||
|
||||
# ARCMigrate and Rewrite are always needed because of libclang.
|
||||
PARALLEL_DIRS = Headers Basic Lex Parse AST Sema CodeGen Analysis Frontend \
|
||||
FrontendTool Tooling Driver Format Edit Rewrite Serialization \
|
||||
Index ASTMatchers
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
|
||||
ifeq ($(ENABLE_CLANG_STATIC_ANALYZER),1)
|
||||
PARALLEL_DIRS += StaticAnalyzer
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_CLANG_ARCMT),1)
|
||||
PARALLEL_DIRS += ARCMigrate
|
||||
endif
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,18 +0,0 @@
|
|||
##===- clang/lib/Parse/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements the Parser library for the C-Language front-end.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangParse
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
##===- clang/lib/Rewrite/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements code transformation / rewriting facilities.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangRewrite
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
##===- clang/lib/Sema/Makefile -----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements the semantic analyzer and AST builder library for the
|
||||
# C-Language front-end.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangSema
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
##===- clang/lib/Serialization/Makefile --------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements the semantic analyzer and AST builder library for the
|
||||
# C-Language front-end.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangSerialization
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
##===- clang/lib/Checker/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements analyses built on top of source-level CFGs.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../../..
|
||||
LIBRARYNAME := clangStaticAnalyzerCheckers
|
||||
|
||||
BUILT_SOURCES = Checkers.inc
|
||||
TABLEGEN_INC_FILES_COMMON = 1
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
$(ObjDir)/Checkers.inc.tmp : Checkers.td $(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include/clang/StaticAnalyzer/Checkers/CheckerBase.td $(CLANG_TBLGEN) $(ObjDir)/.dir
|
||||
$(Echo) "Building Clang SA Checkers tables with tblgen"
|
||||
$(Verb) $(ClangTableGen) -gen-clang-sa-checkers -I $(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include -o $(call SYSPATH, $@) $<
|
|
@ -1,17 +0,0 @@
|
|||
##===- clang/lib/StaticAnalyzer/Core/Makefile --------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements analyses built on top of source-level CFGs.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../../..
|
||||
LIBRARYNAME := clangStaticAnalyzerCore
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,19 +0,0 @@
|
|||
##===- clang/lib/StaticAnalyzer/Frontend/Makefile ----------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# Starting point into the static analyzer land for the driver.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../../..
|
||||
LIBRARYNAME := clangStaticAnalyzerFrontend
|
||||
|
||||
CPP.Flags += -I${PROJ_OBJ_DIR}/../Checkers
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,18 +0,0 @@
|
|||
##===- clang/lib/StaticAnalyzer/Makefile -------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements analyses built on top of source-level CFGs.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
DIRS := Checkers Frontend
|
||||
PARALLEL_DIRS := Core
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,13 +0,0 @@
|
|||
##===- clang/lib/Tooling/Core/Makefile ---------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../../..
|
||||
LIBRARYNAME := clangToolingCore
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,14 +0,0 @@
|
|||
##===- clang/lib/Tooling/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME := clangTooling
|
||||
PARALLEL_DIRS := Core
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,22 +0,0 @@
|
|||
##===- runtime/Makefile ------------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ..
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
|
||||
ifndef NO_RUNTIME_LIBS
|
||||
|
||||
PARALLEL_DIRS := compiler-rt libcxx
|
||||
|
||||
endif
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
install::
|
||||
|
|
@ -1,259 +0,0 @@
|
|||
##===- clang/runtime/compiler-rt/Makefile ------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This file defines support for building the Clang runtime libraries (which are
|
||||
# implemented by compiler-rt) and placing them in the proper locations in the
|
||||
# Clang resources directory (i.e., where the driver expects them).
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
CLANG_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
|
||||
$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
|
||||
|
||||
ResourceDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/clang/$(CLANG_VERSION)
|
||||
PROJ_resources := $(DESTDIR)$(PROJ_prefix)/lib/clang/$(CLANG_VERSION)
|
||||
|
||||
ResourceLibDir := $(ResourceDir)/lib
|
||||
ResourceIncludeDir := $(ResourceDir)/include
|
||||
PROJ_resources_lib := $(PROJ_resources)/lib
|
||||
PROJ_resources_include := $(PROJ_resources)/include
|
||||
|
||||
# Expect compiler-rt to be in llvm/projects/compiler-rt
|
||||
COMPILERRT_SRC_ROOT := $(LLVM_SRC_ROOT)/projects/compiler-rt
|
||||
|
||||
# We don't currently support building runtime libraries when we are
|
||||
# cross-compiling. The issue is that we really want to be set up so that the
|
||||
# available compiler targets are independent of the current build.
|
||||
#
|
||||
# Since we have to build the runtime libraries for the target, it requires we
|
||||
# have a cross compiler from the build machine to the target. Although in the
|
||||
# case where for the current build (host == target), we do have such a cross
|
||||
# compiler, but not defined in a way that is easy for us to reuse. Regardless,
|
||||
# that also wouldn't help for other possible compiler configurations.
|
||||
#
|
||||
# Thus, the simple set up we currently use is to assume that we will be using
|
||||
# the just built Clang to compile the compiler-rt libraries. As we grow better
|
||||
# cross compilation support inside Clang and tool support in LLVM, this makes it
|
||||
# easier for us to achieve the goal of having the compiler targets be easily
|
||||
# selected at configure time. However, this design does currently preclude the
|
||||
# building of compiler-rt libraries when the Clang itself is being cross
|
||||
# compiled.
|
||||
#
|
||||
# There are three possible solutions:
|
||||
# 1. Require building a build-target version of Clang when cross compiling. This
|
||||
# is simplest, but als greatly increases the build time of cross builds.
|
||||
#
|
||||
# 2. Require cross builds have a build-target version of Clang available for
|
||||
# use. This is a reasonable compromise on #1, as the compiler-rt libraries
|
||||
# are simple enough that there is not a strong desire to ensure they are
|
||||
# built with the exact version of Clang being used. Similarly, as Clang
|
||||
# becomes a better cross compiler it is also increasingly more likely that
|
||||
# the cross compiler being used will already be a version of Clang.
|
||||
#
|
||||
# 3. Come up with an alternate mechanism to define all the toolchain
|
||||
# information that compiler-rt would need to build libraries for all the
|
||||
# requested targets. This might be a simple short term solution, but is
|
||||
# likely to be unwieldy and irritating to maintain in the long term.
|
||||
ifneq ($(LLVM_CROSS_COMPILING),1)
|
||||
ifneq ($(CLANG_NO_RUNTIME),1)
|
||||
ifeq ($(shell test -d $(COMPILERRT_SRC_ROOT) && echo OK),OK)
|
||||
|
||||
# Select the compiler-rt configuration to use, and install directory.
|
||||
#
|
||||
# FIXME: Eventually, we want some kind of configure support for this. We want to
|
||||
# build/install runtime libraries for as many targets as clang was configured to
|
||||
# support.
|
||||
RuntimeDirs :=
|
||||
ifeq ($(OS),Darwin)
|
||||
RuntimeDirs += darwin macho_embedded
|
||||
RuntimeLibrary.darwin.Configs := \
|
||||
eprintf.a 10.4.a osx.a cc_kext.a \
|
||||
asan_osx_dynamic.dylib \
|
||||
profile_osx.a \
|
||||
ubsan_osx_dynamic.dylib
|
||||
|
||||
IOS_SDK := $(shell xcrun --show-sdk-path -sdk iphoneos 2> /dev/null)
|
||||
IOSSIM_SDK := $(shell xcrun --show-sdk-path -sdk iphonesimulator 2> /dev/null)
|
||||
|
||||
ifneq ($(IOS_SDK)$(IOSSIM_SDK),)
|
||||
RuntimeLibrary.darwin.Configs += ios.a profile_ios.a
|
||||
endif
|
||||
|
||||
ifneq ($(IOS_SDK),)
|
||||
ifneq (,$(filter ARM AARCH64,$(TARGETS_TO_BUILD)))
|
||||
RuntimeLibrary.darwin.Configs += cc_kext_ios.a
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(IOSSIM_SDK),)
|
||||
RuntimeLibrary.darwin.Configs += asan_iossim_dynamic.dylib \
|
||||
ubsan_iossim_dynamic.dylib
|
||||
endif
|
||||
|
||||
RuntimeLibrary.macho_embedded.Configs := \
|
||||
hard_static.a hard_pic.a
|
||||
ifneq (,$(findstring ARM,$(TARGETS_TO_BUILD)))
|
||||
RuntimeLibrary.macho_embedded.Configs += \
|
||||
soft_static.a soft_pic.a
|
||||
endif
|
||||
endif
|
||||
|
||||
# On Linux, include a library which has all the runtime functions.
|
||||
ifeq ($(OS),Linux)
|
||||
RuntimeDirs += linux
|
||||
RuntimeLibrary.linux.Configs :=
|
||||
|
||||
# TryCompile compiler source flags
|
||||
# Returns exit code of running a compiler invocation.
|
||||
TryCompile = \
|
||||
$(shell \
|
||||
cflags=""; \
|
||||
for flag in $(3); do \
|
||||
cflags="$$cflags $$flag"; \
|
||||
done; \
|
||||
$(1) $$cflags $(2) -o /dev/null > /dev/null 2> /dev/null ; \
|
||||
echo $$?)
|
||||
|
||||
# We try to build 32-bit runtimes both on 32-bit hosts and 64-bit hosts.
|
||||
Runtime32BitConfigs = \
|
||||
builtins-i386.a profile-i386.a
|
||||
|
||||
# We currently only try to generate runtime libraries on x86.
|
||||
ifeq ($(ARCH),x86)
|
||||
RuntimeLibrary.linux.Configs += $(Runtime32BitConfigs)
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
RuntimeLibrary.linux.Configs += \
|
||||
builtins-x86_64.a profile-x86_64.a
|
||||
# We need to build 32-bit libraries on 64-bit platform, and add them
|
||||
# to the list of runtime libraries to make "clang -m32" work.
|
||||
# We check that Clang can produce working 32-bit binaries by compiling a simple
|
||||
# executable.
|
||||
test_source = $(LLVM_SRC_ROOT)/tools/clang/runtime/compiler-rt/clang_linux_test_input.c
|
||||
ifeq ($(call TryCompile,$(ToolDir)/clang,$(test_source),-m32),0)
|
||||
RuntimeLibrary.linux.Configs += $(Runtime32BitConfigs)
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
####
|
||||
# The build rules below are designed to be generic and should only need to be
|
||||
# modified based on changes in the compiler-rt layout or build system.
|
||||
####
|
||||
|
||||
# Rule to build the compiler-rt libraries we need.
|
||||
#
|
||||
# We build all the libraries in a single shot to avoid recursive make as much as
|
||||
# possible.
|
||||
BuildRuntimeLibraries:
|
||||
$(Verb) $(MAKE) -C $(COMPILERRT_SRC_ROOT) \
|
||||
ProjSrcRoot=$(COMPILERRT_SRC_ROOT) \
|
||||
ProjObjRoot=$(PROJ_OBJ_DIR) \
|
||||
CC="$(ToolDir)/clang" \
|
||||
VERBOSE=$(VERBOSE) \
|
||||
$(RuntimeDirs:%=clang_%)
|
||||
.PHONY: BuildRuntimeLibraries
|
||||
CleanRuntimeLibraries:
|
||||
$(Verb) $(MAKE) -C $(COMPILERRT_SRC_ROOT) \
|
||||
ProjSrcRoot=$(COMPILERRT_SRC_ROOT) \
|
||||
ProjObjRoot=$(PROJ_OBJ_DIR) \
|
||||
VERBOSE=$(VERBOSE) \
|
||||
clean
|
||||
.PHONY: CleanRuntimeLibraries
|
||||
RuntimeHeader: $(ResourceIncludeDir)/sanitizer
|
||||
|
||||
$(PROJ_resources_lib):
|
||||
$(Verb) $(MKDIR) $@
|
||||
|
||||
$(ResourceIncludeDir):
|
||||
$(Verb) $(MKDIR) $@
|
||||
|
||||
$(ResourceIncludeDir)/sanitizer: $(ResourceIncludeDir)
|
||||
$(Verb) $(MKDIR) $@
|
||||
$(Verb) cp $(COMPILERRT_SRC_ROOT)/include/sanitizer/*.h $@
|
||||
|
||||
# Expand rules for copying/installing each individual library. We can't use
|
||||
# implicit rules here because we need to match against multiple things.
|
||||
define RuntimeLibraryTemplate
|
||||
$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.a: BuildRuntimeLibraries
|
||||
@true
|
||||
$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.so: BuildRuntimeLibraries
|
||||
@true
|
||||
$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.dylib: BuildRuntimeLibraries
|
||||
@true
|
||||
.PRECIOUS: $(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.a
|
||||
|
||||
# Rule to copy the libraries to their resource directory location.
|
||||
$(ResourceLibDir)/$1/libclang_rt.%.a: \
|
||||
$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.a \
|
||||
$(ResourceLibDir)/$1/.dir
|
||||
$(Echo) Copying runtime library $1/$$* to build dir
|
||||
$(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.a $$@
|
||||
$(ResourceLibDir)/$1/libclang_rt.%.so: \
|
||||
$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.so \
|
||||
$(ResourceLibDir)/$1/.dir
|
||||
$(Echo) Copying runtime library $1/$$* to build dir
|
||||
$(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.so $$@
|
||||
$(ResourceLibDir)/$1/libclang_rt.%.dylib: \
|
||||
$(PROJ_OBJ_DIR)/clang_$1/%/libcompiler_rt.dylib \
|
||||
$(ResourceLibDir)/$1/.dir
|
||||
$(Echo) Copying runtime library $1/$$* to build dir
|
||||
$(Verb) cp $(PROJ_OBJ_DIR)/clang_$1/$$*/libcompiler_rt.dylib $$@
|
||||
RuntimeLibrary.$1: \
|
||||
$(RuntimeLibrary.$1.Configs:%=$(ResourceLibDir)/$1/libclang_rt.%)
|
||||
.PHONY: RuntimeLibrary.$1
|
||||
|
||||
$(PROJ_resources_lib)/$1: $(PROJ_resources_lib)
|
||||
$(Verb) $(MKDIR) $$@
|
||||
|
||||
$(PROJ_resources_lib)/$1/libclang_rt.%.a: \
|
||||
$(ResourceLibDir)/$1/libclang_rt.%.a | $(PROJ_resources_lib)/$1
|
||||
$(Echo) Installing compiler runtime library: $1/$$*
|
||||
$(Verb) $(DataInstall) $$< $(PROJ_resources_lib)/$1
|
||||
$(PROJ_resources_lib)/$1/libclang_rt.%.so: \
|
||||
$(ResourceLibDir)/$1/libclang_rt.%.so | $(PROJ_resources_lib)/$1
|
||||
$(Echo) Installing compiler runtime library: $1/$$*
|
||||
$(Verb) $(DataInstall) $$< $(PROJ_resources_lib)/$1
|
||||
$(PROJ_resources_lib)/$1/libclang_rt.%.dylib: \
|
||||
$(ResourceLibDir)/$1/libclang_rt.%.dylib | $(PROJ_resources_lib)/$1
|
||||
$(Echo) Installing compiler runtime library: $1/$$*
|
||||
$(Verb) $(DataInstall) $$< $(PROJ_resources_lib)/$1
|
||||
|
||||
# Rule to install runtime libraries.
|
||||
RuntimeLibraryInstall.$1: \
|
||||
$(RuntimeLibrary.$1.Configs:%=$(PROJ_resources_lib)/$1/libclang_rt.%)
|
||||
.PHONY: RuntimeLibraryInstall.$1
|
||||
endef
|
||||
$(foreach lib,$(RuntimeDirs), $(eval $(call RuntimeLibraryTemplate,$(lib))))
|
||||
|
||||
$(PROJ_resources_include):
|
||||
$(Verb) $(MKDIR) $@
|
||||
|
||||
$(PROJ_resources_include)/sanitizer: $(ResourceIncludeDir)/sanitizer $(PROJ_resources_include)
|
||||
$(Verb) $(MKDIR) $@
|
||||
$(Echo) Installing compiler runtime headers
|
||||
$(Verb) $(DataInstall) $(ResourceIncludeDir)/sanitizer/* \
|
||||
$(PROJ_resources_include)/sanitizer
|
||||
|
||||
RuntimeHeaderInstall: $(PROJ_resources_include)/sanitizer
|
||||
.PHONY: RuntimeHeaderInstall
|
||||
|
||||
# Hook into the standard Makefile rules.
|
||||
all-local:: $(RuntimeDirs:%=RuntimeLibrary.%) RuntimeHeader
|
||||
install-local:: $(RuntimeDirs:%=RuntimeLibraryInstall.%) RuntimeHeaderInstall
|
||||
clean-local:: CleanRuntimeLibraries
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
|
@ -1,31 +0,0 @@
|
|||
##===- clang/runtime/libcxx/Makefile -----------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This file defines support for installing a copy of the libcxx headers where
|
||||
# the driver expects them.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
PROJ_libcxx_hdrs := $(DESTDIR)$(PROJ_prefix)/include
|
||||
|
||||
# Expect libcxx to be in llvm/projects/libcxx
|
||||
LIBCXX_SRC_ROOT := $(LLVM_SRC_ROOT)/projects/libcxx
|
||||
|
||||
ifneq ($(CLANG_NO_RUNTIME),1)
|
||||
ifeq ($(shell test -d $(LIBCXX_SRC_ROOT) && echo OK),OK)
|
||||
|
||||
install-local::
|
||||
$(MAKE) -C $(LIBCXX_SRC_ROOT) \
|
||||
HEADER_DIR=$(PROJ_libcxx_hdrs) installheaders
|
||||
|
||||
endif
|
||||
endif
|
|
@ -1,77 +0,0 @@
|
|||
CLANG_LEVEL := ..
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
# Test in all immediate subdirectories if unset.
|
||||
ifdef TESTSUITE
|
||||
TESTDIRS := $(TESTSUITE:%=$(PROJ_SRC_DIR)/%)
|
||||
else
|
||||
TESTDIRS ?= $(PROJ_SRC_DIR)
|
||||
endif
|
||||
|
||||
# 'lit' wants objdir paths, so it will pick up the lit.site.cfg.
|
||||
TESTDIRS := $(TESTDIRS:$(PROJ_SRC_DIR)%=$(PROJ_OBJ_DIR)%)
|
||||
|
||||
# Allow EXTRA_TESTDIRS to provide additional test directories.
|
||||
TESTDIRS += $(EXTRA_TESTDIRS)
|
||||
|
||||
ifndef TESTARGS
|
||||
ifdef VERBOSE
|
||||
TESTARGS = -v
|
||||
else
|
||||
TESTARGS = -s -v
|
||||
endif
|
||||
endif
|
||||
|
||||
# Make sure any extra test suites can find the main site config.
|
||||
LIT_ARGS := --param clang_site_config=$(PROJ_OBJ_DIR)/lit.site.cfg
|
||||
|
||||
ifdef VG
|
||||
LIT_ARGS += "--vg"
|
||||
endif
|
||||
|
||||
all:: lit.site.cfg Unit/lit.site.cfg
|
||||
@ echo '--- Running clang tests for $(TARGET_TRIPLE) ---'
|
||||
@ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \
|
||||
$(LIT_ARGS) $(TESTARGS) $(TESTDIRS)
|
||||
|
||||
FORCE:
|
||||
|
||||
lit.site.cfg: FORCE
|
||||
@echo "Making Clang 'lit.site.cfg' file..."
|
||||
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
|
||||
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@CLANG_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@LLVM_HOST_TRIPLE@=$(HOST_TRIPLE)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@ENABLE_CLANG_ARCMT@=$(ENABLE_CLANG_ARCMT)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@ENABLE_CLANG_STATIC_ANALYZER@=$(ENABLE_CLANG_STATIC_ANALYZER)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@ENABLE_CLANG_EXAMPLES@=$(ENABLE_CLANG_EXAMPLES)=g >> lit.tmp
|
||||
@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
|
||||
@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
|
||||
@-rm -f lit.tmp
|
||||
|
||||
Unit/lit.site.cfg: FORCE
|
||||
@echo "Making Clang 'Unit/lit.site.cfg' file..."
|
||||
@$(MKDIR) $(dir $@)
|
||||
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > unit.tmp
|
||||
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp
|
||||
@$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp
|
||||
@sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
|
||||
@-rm -f unit.tmp
|
||||
|
||||
clean::
|
||||
@ find . -name Output | xargs rm -fr
|
||||
|
||||
.PHONY: all report clean
|
|
@ -1,377 +0,0 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
||||
|
||||
/*
|
||||
Conditions for warning:
|
||||
1. the property is atomic
|
||||
2. the current @implementation contains an @synthesize for the property
|
||||
3. the current @implementation contains a hand-written setter XOR getter
|
||||
4. the property is read-write
|
||||
|
||||
Cases marked WARN should warn one the following:
|
||||
warning: Atomic property 'x' has a synthesized setter and a
|
||||
manually-implemented getter, which may break atomicity.
|
||||
warning: Atomic property 'x' has a synthesized getter and a
|
||||
manually-implemented setter, which may break atomicity.
|
||||
|
||||
Cases not marked WARN only satisfy the indicated subset
|
||||
of the conditions required to warn.
|
||||
|
||||
There should be 8 warnings.
|
||||
*/
|
||||
|
||||
@interface Foo
|
||||
{
|
||||
/* 12 4 */ int GetSet;
|
||||
/* WARN */ int Get;
|
||||
/* WARN */ int Set;
|
||||
/* 12 4 */ int None;
|
||||
/* 2 4 */ int GetSet_Nonatomic;
|
||||
/* 234 */ int Get_Nonatomic;
|
||||
/* 234 */ int Set_Nonatomic;
|
||||
/* 2 4 */ int None_Nonatomic;
|
||||
|
||||
/* 12 */ int GetSet_ReadOnly;
|
||||
/* 123 */ int Get_ReadOnly;
|
||||
/* 123 */ int Set_ReadOnly;
|
||||
/* 12 */ int None_ReadOnly;
|
||||
/* 2 */ int GetSet_Nonatomic_ReadOnly;
|
||||
/* 23 */ int Get_Nonatomic_ReadOnly;
|
||||
/* 23 */ int Set_Nonatomic_ReadOnly;
|
||||
/* 2 */ int None_Nonatomic_ReadOnly;
|
||||
|
||||
/* 12 4 */ int GetSet_ReadWriteInExt;
|
||||
/* WARN */ int Get_ReadWriteInExt;
|
||||
/* WARN */ int Set_ReadWriteInExt;
|
||||
/* 12 4 */ int None_ReadWriteInExt;
|
||||
/* 2 4 */ int GetSet_Nonatomic_ReadWriteInExt;
|
||||
/* 234 */ int Get_Nonatomic_ReadWriteInExt;
|
||||
/* 234 */ int Set_Nonatomic_ReadWriteInExt;
|
||||
/* 2 4 */ int None_Nonatomic_ReadWriteInExt;
|
||||
|
||||
|
||||
/* 12 4 */ int GetSet_LateSynthesize;
|
||||
/* WARN */ int Get_LateSynthesize;
|
||||
/* WARN */ int Set_LateSynthesize;
|
||||
/* 12 4 */ int None_LateSynthesize;
|
||||
/* 2 4 */ int GetSet_Nonatomic_LateSynthesize;
|
||||
/* 234 */ int Get_Nonatomic_LateSynthesize;
|
||||
/* 234 */ int Set_Nonatomic_LateSynthesize;
|
||||
/* 2 4 */ int None_Nonatomic_LateSynthesize;
|
||||
|
||||
/* 12 */ int GetSet_ReadOnly_LateSynthesize;
|
||||
/* 123 */ int Get_ReadOnly_LateSynthesize;
|
||||
/* 123 */ int Set_ReadOnly_LateSynthesize;
|
||||
/* 12 */ int None_ReadOnly_LateSynthesize;
|
||||
/* 2 */ int GetSet_Nonatomic_ReadOnly_LateSynthesize;
|
||||
/* 23 */ int Get_Nonatomic_ReadOnly_LateSynthesize;
|
||||
/* 23 */ int Set_Nonatomic_ReadOnly_LateSynthesize;
|
||||
/* 2 */ int None_Nonatomic_ReadOnly_LateSynthesize;
|
||||
|
||||
/* 12 4 */ int GetSet_ReadWriteInExt_LateSynthesize;
|
||||
/* WARN */ int Get_ReadWriteInExt_LateSynthesize;
|
||||
/* WARN */ int Set_ReadWriteInExt_LateSynthesize;
|
||||
/* 12 4 */ int None_ReadWriteInExt_LateSynthesize;
|
||||
/* 2 4 */ int GetSet_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
/* 234 */ int Get_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
/* 234 */ int Set_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
/* 2 4 */ int None_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
|
||||
|
||||
/* 1 4 */ int GetSet_NoSynthesize;
|
||||
/* 1 34 */ int Get_NoSynthesize;
|
||||
/* 1 34 */ int Set_NoSynthesize;
|
||||
/* 1 4 */ int None_NoSynthesize;
|
||||
/* 4 */ int GetSet_Nonatomic_NoSynthesize;
|
||||
/* 34 */ int Get_Nonatomic_NoSynthesize;
|
||||
/* 34 */ int Set_Nonatomic_NoSynthesize;
|
||||
/* 4 */ int None_Nonatomic_NoSynthesize;
|
||||
|
||||
/* 1 */ int GetSet_ReadOnly_NoSynthesize;
|
||||
/* 1 3 */ int Get_ReadOnly_NoSynthesize;
|
||||
/* 1 3 */ int Set_ReadOnly_NoSynthesize;
|
||||
/* 1 */ int None_ReadOnly_NoSynthesize;
|
||||
/* */ int GetSet_Nonatomic_ReadOnly_NoSynthesize;
|
||||
/* 3 */ int Get_Nonatomic_ReadOnly_NoSynthesize;
|
||||
/* 3 */ int Set_Nonatomic_ReadOnly_NoSynthesize;
|
||||
/* */ int None_Nonatomic_ReadOnly_NoSynthesize;
|
||||
|
||||
/* 1 4 */ int GetSet_ReadWriteInExt_NoSynthesize;
|
||||
/* 1 34 */ int Get_ReadWriteInExt_NoSynthesize;
|
||||
/* 1 34 */ int Set_ReadWriteInExt_NoSynthesize;
|
||||
/* 1 4 */ int None_ReadWriteInExt_NoSynthesize;
|
||||
/* 4 */ int GetSet_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
/* 34 */ int Get_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
/* 34 */ int Set_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
/* 4 */ int None_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
}
|
||||
|
||||
// read-write - might warn
|
||||
@property int GetSet;
|
||||
@property int Get; // expected-note {{property declared here}} \
|
||||
// expected-note {{setter and getter must both be synthesized}}
|
||||
@property int Set; // expected-note {{property declared here}} \
|
||||
// expected-note {{setter and getter must both be synthesized}}
|
||||
@property int None;
|
||||
@property(nonatomic) int GetSet_Nonatomic;
|
||||
@property(nonatomic) int Get_Nonatomic;
|
||||
@property(nonatomic) int Set_Nonatomic;
|
||||
@property(nonatomic) int None_Nonatomic;
|
||||
|
||||
// read-only - must not warn
|
||||
@property(readonly) int GetSet_ReadOnly;
|
||||
@property(readonly) int Get_ReadOnly;
|
||||
@property(readonly) int Set_ReadOnly;
|
||||
@property(readonly) int None_ReadOnly;
|
||||
@property(nonatomic,readonly) int GetSet_Nonatomic_ReadOnly;
|
||||
@property(nonatomic,readonly) int Get_Nonatomic_ReadOnly;
|
||||
@property(nonatomic,readonly) int Set_Nonatomic_ReadOnly;
|
||||
@property(nonatomic,readonly) int None_Nonatomic_ReadOnly;
|
||||
|
||||
// read-only in class, read-write in class extension - might warn
|
||||
@property(readonly) int GetSet_ReadWriteInExt;
|
||||
@property(readonly) int Get_ReadWriteInExt;
|
||||
@property(readonly) int Set_ReadWriteInExt;
|
||||
@property(readonly) int None_ReadWriteInExt;
|
||||
@property(nonatomic,readonly) int GetSet_Nonatomic_ReadWriteInExt;
|
||||
@property(nonatomic,readonly) int Get_Nonatomic_ReadWriteInExt;
|
||||
@property(nonatomic,readonly) int Set_Nonatomic_ReadWriteInExt;
|
||||
@property(nonatomic,readonly) int None_Nonatomic_ReadWriteInExt;
|
||||
|
||||
|
||||
// same as above, but @synthesize follows the hand-written methods - might warn
|
||||
@property int GetSet_LateSynthesize;
|
||||
@property int Get_LateSynthesize; // expected-note {{property declared here}} \
|
||||
// expected-note {{setter and getter must both be synthesized}}
|
||||
@property int Set_LateSynthesize; // expected-note {{property declared here}} \
|
||||
// expected-note {{setter and getter must both be synthesized}}
|
||||
@property int None_LateSynthesize;
|
||||
@property(nonatomic) int GetSet_Nonatomic_LateSynthesize;
|
||||
@property(nonatomic) int Get_Nonatomic_LateSynthesize;
|
||||
@property(nonatomic) int Set_Nonatomic_LateSynthesize;
|
||||
@property(nonatomic) int None_Nonatomic_LateSynthesize;
|
||||
|
||||
@property(readonly) int GetSet_ReadOnly_LateSynthesize;
|
||||
@property(readonly) int Get_ReadOnly_LateSynthesize;
|
||||
@property(readonly) int Set_ReadOnly_LateSynthesize;
|
||||
@property(readonly) int None_ReadOnly_LateSynthesize;
|
||||
@property(nonatomic,readonly) int GetSet_Nonatomic_ReadOnly_LateSynthesize;
|
||||
@property(nonatomic,readonly) int Get_Nonatomic_ReadOnly_LateSynthesize;
|
||||
@property(nonatomic,readonly) int Set_Nonatomic_ReadOnly_LateSynthesize;
|
||||
@property(nonatomic,readonly) int None_Nonatomic_ReadOnly_LateSynthesize;
|
||||
|
||||
@property(readonly) int GetSet_ReadWriteInExt_LateSynthesize;
|
||||
@property(readonly) int Get_ReadWriteInExt_LateSynthesize;
|
||||
@property(readonly) int Set_ReadWriteInExt_LateSynthesize;
|
||||
@property(readonly) int None_ReadWriteInExt_LateSynthesize;
|
||||
@property(nonatomic,readonly) int GetSet_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
@property(nonatomic,readonly) int Get_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
@property(nonatomic,readonly) int Set_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
@property(nonatomic,readonly) int None_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
|
||||
|
||||
// same as above, but with no @synthesize - must not warn
|
||||
@property int GetSet_NoSynthesize;
|
||||
@property int Get_NoSynthesize;
|
||||
@property int Set_NoSynthesize;
|
||||
@property int None_NoSynthesize;
|
||||
@property(nonatomic) int GetSet_Nonatomic_NoSynthesize;
|
||||
@property(nonatomic) int Get_Nonatomic_NoSynthesize;
|
||||
@property(nonatomic) int Set_Nonatomic_NoSynthesize;
|
||||
@property(nonatomic) int None_Nonatomic_NoSynthesize;
|
||||
|
||||
@property(readonly) int GetSet_ReadOnly_NoSynthesize;
|
||||
@property(readonly) int Get_ReadOnly_NoSynthesize;
|
||||
@property(readonly) int Set_ReadOnly_NoSynthesize;
|
||||
@property(readonly) int None_ReadOnly_NoSynthesize;
|
||||
@property(nonatomic,readonly) int GetSet_Nonatomic_ReadOnly_NoSynthesize;
|
||||
@property(nonatomic,readonly) int Get_Nonatomic_ReadOnly_NoSynthesize;
|
||||
@property(nonatomic,readonly) int Set_Nonatomic_ReadOnly_NoSynthesize;
|
||||
@property(nonatomic,readonly) int None_Nonatomic_ReadOnly_NoSynthesize;
|
||||
|
||||
@property(readonly) int GetSet_ReadWriteInExt_NoSynthesize;
|
||||
@property(readonly) int Get_ReadWriteInExt_NoSynthesize;
|
||||
@property(readonly) int Set_ReadWriteInExt_NoSynthesize;
|
||||
@property(readonly) int None_ReadWriteInExt_NoSynthesize;
|
||||
@property(nonatomic,readonly) int GetSet_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
@property(nonatomic,readonly) int Get_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
@property(nonatomic,readonly) int Set_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
@property(nonatomic,readonly) int None_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface Foo ()
|
||||
|
||||
@property(readwrite) int GetSet_ReadWriteInExt;
|
||||
@property(readwrite) int Get_ReadWriteInExt; // expected-note {{property declared here}} \
|
||||
// expected-note {{setter and getter must both be synthesized}}
|
||||
@property(readwrite) int Set_ReadWriteInExt; // expected-note {{property declared here}} \
|
||||
// expected-note {{setter and getter must both be synthesized}}
|
||||
@property(readwrite) int None_ReadWriteInExt;
|
||||
@property(nonatomic,readwrite) int GetSet_Nonatomic_ReadWriteInExt;
|
||||
@property(nonatomic,readwrite) int Get_Nonatomic_ReadWriteInExt;
|
||||
@property(nonatomic,readwrite) int Set_Nonatomic_ReadWriteInExt;
|
||||
@property(nonatomic,readwrite) int None_Nonatomic_ReadWriteInExt;
|
||||
|
||||
@property(readwrite) int GetSet_ReadWriteInExt_LateSynthesize;
|
||||
@property(readwrite) int Get_ReadWriteInExt_LateSynthesize; // expected-note {{property declared here}} \
|
||||
// expected-note {{setter and getter must both be synthesized}}
|
||||
@property(readwrite) int Set_ReadWriteInExt_LateSynthesize; // expected-note {{property declared here}} \
|
||||
// expected-note {{setter and getter must both be synthesized}}
|
||||
@property(readwrite) int None_ReadWriteInExt_LateSynthesize;
|
||||
@property(nonatomic,readwrite) int GetSet_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
@property(nonatomic,readwrite) int Get_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
@property(nonatomic,readwrite) int Set_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
@property(nonatomic,readwrite) int None_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
|
||||
@property(readwrite) int GetSet_ReadWriteInExt_NoSynthesize;
|
||||
@property(readwrite) int Get_ReadWriteInExt_NoSynthesize;
|
||||
@property(readwrite) int Set_ReadWriteInExt_NoSynthesize;
|
||||
@property(readwrite) int None_ReadWriteInExt_NoSynthesize;
|
||||
@property(nonatomic,readwrite) int GetSet_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
@property(nonatomic,readwrite) int Get_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
@property(nonatomic,readwrite) int Set_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
@property(nonatomic,readwrite) int None_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
|
||||
@end
|
||||
|
||||
@implementation Foo
|
||||
|
||||
@synthesize GetSet, Get, Set, None, GetSet_Nonatomic, Get_Nonatomic, Set_Nonatomic, None_Nonatomic;
|
||||
@synthesize GetSet_ReadOnly, Get_ReadOnly, Set_ReadOnly, None_ReadOnly, GetSet_Nonatomic_ReadOnly, Get_Nonatomic_ReadOnly, Set_Nonatomic_ReadOnly, None_Nonatomic_ReadOnly;
|
||||
@synthesize GetSet_ReadWriteInExt, Get_ReadWriteInExt, Set_ReadWriteInExt, None_ReadWriteInExt, GetSet_Nonatomic_ReadWriteInExt, Get_Nonatomic_ReadWriteInExt, Set_Nonatomic_ReadWriteInExt, None_Nonatomic_ReadWriteInExt;
|
||||
|
||||
#define GET(x) \
|
||||
-(int) x { return self->x; }
|
||||
#define SET(x) \
|
||||
-(void) set##x:(int)value { self->x = value; }
|
||||
|
||||
GET(GetSet)
|
||||
SET(GetSet)
|
||||
GET(Get) // expected-warning {{writable atomic property 'Get' cannot pair a synthesized setter with a user defined getter}}
|
||||
SET(Set) // expected-warning {{writable atomic property 'Set' cannot pair a synthesized getter with a user defined setter}}
|
||||
GET(GetSet_Nonatomic)
|
||||
SET(GetSet_Nonatomic)
|
||||
GET(Get_Nonatomic)
|
||||
SET(Set_Nonatomic)
|
||||
|
||||
GET(GetSet_ReadOnly)
|
||||
SET(GetSet_ReadOnly)
|
||||
GET(Get_ReadOnly)
|
||||
SET(Set_ReadOnly)
|
||||
GET(GetSet_Nonatomic_ReadOnly)
|
||||
SET(GetSet_Nonatomic_ReadOnly)
|
||||
GET(Get_Nonatomic_ReadOnly)
|
||||
SET(Set_Nonatomic_ReadOnly)
|
||||
|
||||
GET(GetSet_ReadWriteInExt)
|
||||
SET(GetSet_ReadWriteInExt)
|
||||
GET(Get_ReadWriteInExt) // expected-warning {{writable atomic property 'Get_ReadWriteInExt' cannot pair a synthesized setter with a user defined getter}}
|
||||
SET(Set_ReadWriteInExt) // expected-warning {{writable atomic property 'Set_ReadWriteInExt' cannot pair a synthesized getter with a user defined setter}}
|
||||
GET(GetSet_Nonatomic_ReadWriteInExt)
|
||||
SET(GetSet_Nonatomic_ReadWriteInExt)
|
||||
GET(Get_Nonatomic_ReadWriteInExt)
|
||||
SET(Set_Nonatomic_ReadWriteInExt)
|
||||
|
||||
|
||||
GET(GetSet_LateSynthesize)
|
||||
SET(GetSet_LateSynthesize)
|
||||
GET(Get_LateSynthesize) // expected-warning {{writable atomic property 'Get_LateSynthesize' cannot pair a synthesized setter with a user defined getter}}
|
||||
SET(Set_LateSynthesize) // expected-warning {{writable atomic property 'Set_LateSynthesize' cannot pair a synthesized getter with a user defined setter}}
|
||||
GET(GetSet_Nonatomic_LateSynthesize)
|
||||
SET(GetSet_Nonatomic_LateSynthesize)
|
||||
GET(Get_Nonatomic_LateSynthesize)
|
||||
SET(Set_Nonatomic_LateSynthesize)
|
||||
|
||||
GET(GetSet_ReadOnly_LateSynthesize)
|
||||
SET(GetSet_ReadOnly_LateSynthesize)
|
||||
GET(Get_ReadOnly_LateSynthesize)
|
||||
SET(Set_ReadOnly_LateSynthesize)
|
||||
GET(GetSet_Nonatomic_ReadOnly_LateSynthesize)
|
||||
SET(GetSet_Nonatomic_ReadOnly_LateSynthesize)
|
||||
GET(Get_Nonatomic_ReadOnly_LateSynthesize)
|
||||
SET(Set_Nonatomic_ReadOnly_LateSynthesize)
|
||||
|
||||
GET(GetSet_ReadWriteInExt_LateSynthesize)
|
||||
SET(GetSet_ReadWriteInExt_LateSynthesize)
|
||||
GET(Get_ReadWriteInExt_LateSynthesize) // expected-warning {{writable atomic property 'Get_ReadWriteInExt_LateSynthesize' cannot pair a synthesized setter with a user defined getter}}
|
||||
SET(Set_ReadWriteInExt_LateSynthesize) // expected-warning {{writable atomic property 'Set_ReadWriteInExt_LateSynthesize' cannot pair a synthesized getter with a user defined setter}}
|
||||
GET(GetSet_Nonatomic_ReadWriteInExt_LateSynthesize)
|
||||
SET(GetSet_Nonatomic_ReadWriteInExt_LateSynthesize)
|
||||
GET(Get_Nonatomic_ReadWriteInExt_LateSynthesize)
|
||||
SET(Set_Nonatomic_ReadWriteInExt_LateSynthesize)
|
||||
|
||||
|
||||
GET(GetSet_NoSynthesize)
|
||||
SET(GetSet_NoSynthesize)
|
||||
GET(Get_NoSynthesize)
|
||||
SET(Set_NoSynthesize)
|
||||
GET(GetSet_Nonatomic_NoSynthesize)
|
||||
SET(GetSet_Nonatomic_NoSynthesize)
|
||||
GET(Get_Nonatomic_NoSynthesize)
|
||||
SET(Set_Nonatomic_NoSynthesize)
|
||||
|
||||
GET(GetSet_ReadOnly_NoSynthesize)
|
||||
SET(GetSet_ReadOnly_NoSynthesize)
|
||||
GET(Get_ReadOnly_NoSynthesize)
|
||||
SET(Set_ReadOnly_NoSynthesize)
|
||||
GET(GetSet_Nonatomic_ReadOnly_NoSynthesize)
|
||||
SET(GetSet_Nonatomic_ReadOnly_NoSynthesize)
|
||||
GET(Get_Nonatomic_ReadOnly_NoSynthesize)
|
||||
SET(Set_Nonatomic_ReadOnly_NoSynthesize)
|
||||
|
||||
GET(GetSet_ReadWriteInExt_NoSynthesize)
|
||||
SET(GetSet_ReadWriteInExt_NoSynthesize)
|
||||
GET(Get_ReadWriteInExt_NoSynthesize)
|
||||
SET(Set_ReadWriteInExt_NoSynthesize)
|
||||
GET(GetSet_Nonatomic_ReadWriteInExt_NoSynthesize)
|
||||
SET(GetSet_Nonatomic_ReadWriteInExt_NoSynthesize)
|
||||
GET(Get_Nonatomic_ReadWriteInExt_NoSynthesize)
|
||||
SET(Set_Nonatomic_ReadWriteInExt_NoSynthesize)
|
||||
|
||||
|
||||
// late synthesize - follows getter/setter implementations
|
||||
|
||||
@synthesize GetSet_LateSynthesize, Get_LateSynthesize, Set_LateSynthesize, None_LateSynthesize, GetSet_Nonatomic_LateSynthesize, Get_Nonatomic_LateSynthesize, Set_Nonatomic_LateSynthesize, None_Nonatomic_LateSynthesize;
|
||||
@synthesize GetSet_ReadOnly_LateSynthesize, Get_ReadOnly_LateSynthesize, Set_ReadOnly_LateSynthesize, None_ReadOnly_LateSynthesize, GetSet_Nonatomic_ReadOnly_LateSynthesize, Get_Nonatomic_ReadOnly_LateSynthesize, Set_Nonatomic_ReadOnly_LateSynthesize, None_Nonatomic_ReadOnly_LateSynthesize;
|
||||
@synthesize GetSet_ReadWriteInExt_LateSynthesize, Get_ReadWriteInExt_LateSynthesize, Set_ReadWriteInExt_LateSynthesize, None_ReadWriteInExt_LateSynthesize, GetSet_Nonatomic_ReadWriteInExt_LateSynthesize, Get_Nonatomic_ReadWriteInExt_LateSynthesize, Set_Nonatomic_ReadWriteInExt_LateSynthesize, None_Nonatomic_ReadWriteInExt_LateSynthesize;
|
||||
|
||||
// no synthesize - use dynamic instead
|
||||
|
||||
@dynamic GetSet_NoSynthesize, Get_NoSynthesize, Set_NoSynthesize, None_NoSynthesize, GetSet_Nonatomic_NoSynthesize, Get_Nonatomic_NoSynthesize, Set_Nonatomic_NoSynthesize, None_Nonatomic_NoSynthesize;
|
||||
@dynamic GetSet_ReadOnly_NoSynthesize, Get_ReadOnly_NoSynthesize, Set_ReadOnly_NoSynthesize, None_ReadOnly_NoSynthesize, GetSet_Nonatomic_ReadOnly_NoSynthesize, Get_Nonatomic_ReadOnly_NoSynthesize, Set_Nonatomic_ReadOnly_NoSynthesize, None_Nonatomic_ReadOnly_NoSynthesize;
|
||||
@dynamic GetSet_ReadWriteInExt_NoSynthesize, Get_ReadWriteInExt_NoSynthesize, Set_ReadWriteInExt_NoSynthesize, None_ReadWriteInExt_NoSynthesize, GetSet_Nonatomic_ReadWriteInExt_NoSynthesize, Get_Nonatomic_ReadWriteInExt_NoSynthesize, Set_Nonatomic_ReadWriteInExt_NoSynthesize, None_Nonatomic_ReadWriteInExt_NoSynthesize;
|
||||
|
||||
@end
|
||||
|
||||
/*
|
||||
// the following method should cause a warning along the lines of
|
||||
// :warning: Atomic property 'x' cannot pair a synthesized setter/getter with a manually implemented setter/getter
|
||||
- (void) setX: (int) aValue
|
||||
{
|
||||
x = aValue;
|
||||
}
|
||||
|
||||
// no warning 'cause this is nonatomic
|
||||
- (void) setY: (int) aValue
|
||||
{
|
||||
y = aValue;
|
||||
}
|
||||
|
||||
// the following method should cause a warning along the lines of
|
||||
// :warning: Atomic property 'x' cannot pair a synthesized setter/getter with a manually implemented setter/getter
|
||||
- (int) j
|
||||
{
|
||||
return j;
|
||||
}
|
||||
|
||||
// no warning 'cause this is nonatomic
|
||||
- (int) k
|
||||
{
|
||||
return k;
|
||||
}
|
||||
@end
|
||||
*/
|
||||
int main (int argc, const char * argv[]) {
|
||||
return 0;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
##===- tools/Makefile --------------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ..
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
|
||||
DIRS :=
|
||||
PARALLEL_DIRS := clang-format driver diagtool
|
||||
|
||||
ifeq ($(ENABLE_CLANG_STATIC_ANALYZER), 1)
|
||||
PARALLEL_DIRS += clang-check scan-build scan-view
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_CLANG_ARCMT), 1)
|
||||
DIRS += libclang c-index-test c-arcmt-test
|
||||
PARALLEL_DIRS += arcmt-test
|
||||
endif
|
||||
|
||||
# Recurse into the extra repository of tools if present.
|
||||
OPTIONAL_PARALLEL_DIRS := extra
|
||||
|
||||
ifeq ($(BUILD_CLANG_ONLY),YES)
|
||||
DIRS := libclang c-index-test
|
||||
PARALLEL_DIRS := driver
|
||||
OPTIONAL_PARALLEL_DIRS :=
|
||||
endif
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,26 +0,0 @@
|
|||
##===- tools/arcmt-test/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
TOOLNAME = arcmt-test
|
||||
|
||||
# No plugins, optimize startup time.
|
||||
TOOL_NO_EXPORTS = 1
|
||||
|
||||
# Don't install this. It is used for tests.
|
||||
NO_INSTALL = 1
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangARCMigrate.a clangRewrite.a \
|
||||
clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
|
||||
clangSema.a clangEdit.a clangAnalysis.a clangAST.a clangLex.a \
|
||||
clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,50 +0,0 @@
|
|||
##===- tools/c-arcmt-test/Makefile -------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
TOOLNAME = c-arcmt-test
|
||||
|
||||
# No plugins, optimize startup time.
|
||||
TOOL_NO_EXPORTS = 1
|
||||
|
||||
# Don't install this. It is used for tests.
|
||||
NO_INSTALL = 1
|
||||
|
||||
# Include this here so we can get the configuration of the targets that have
|
||||
# been configured for construction. We have to do this early so we can set up
|
||||
# LINK_COMPONENTS before including Makefile.rules
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) \
|
||||
AsmParser \
|
||||
BitReader \
|
||||
BitWriter \
|
||||
IPO \
|
||||
MC \
|
||||
ObjCARCOpts \
|
||||
Option \
|
||||
Support
|
||||
|
||||
# Note that 'USEDLIBS' must include all of the core clang libraries
|
||||
# when -static is given to linker on cygming.
|
||||
USEDLIBS = clang.a \
|
||||
clangCodeGen.a \
|
||||
clangARCMigrate.a \
|
||||
clangIndex.a \
|
||||
clangFormat.a \
|
||||
clangTooling.a \
|
||||
clangToolingCore.a \
|
||||
clangRewriteFrontend.a \
|
||||
clangRewrite.a \
|
||||
clangFrontend.a clangDriver.a \
|
||||
clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
|
||||
clangSerialization.a clangParse.a clangSema.a \
|
||||
clangAnalysis.a clangEdit.a clangAST.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,58 +0,0 @@
|
|||
##===- tools/index-test/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
TOOLNAME = c-index-test
|
||||
|
||||
# If a separate install prefix was specified for internal tools, use it
|
||||
# when installing c-index-test.
|
||||
INTERNAL_TOOL = 1
|
||||
|
||||
# No plugins, optimize startup time.
|
||||
TOOL_NO_EXPORTS = 1
|
||||
|
||||
# Include this here so we can get the configuration of the targets that have
|
||||
# been configured for construction. We have to do this early so we can set up
|
||||
# LINK_COMPONENTS before including Makefile.rules
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) \
|
||||
AsmParser \
|
||||
BitReader \
|
||||
BitWriter \
|
||||
IPO \
|
||||
MC \
|
||||
ObjCARCOpts \
|
||||
Option \
|
||||
Support
|
||||
|
||||
# Note that 'USEDLIBS' must include all of the core clang libraries
|
||||
# when -static is given to linker on cygming.
|
||||
USEDLIBS = clang.a \
|
||||
clangCodeGen.a \
|
||||
clangIndex.a clangFormat.a clangRewrite.a \
|
||||
clangFrontend.a clangDriver.a \
|
||||
clangTooling.a \
|
||||
clangToolingCore.a \
|
||||
clangSerialization.a clangParse.a clangSema.a \
|
||||
clangAnalysis.a clangEdit.a clangAST.a clangLex.a \
|
||||
clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
LIBS += $(LIBXML2_LIBS)
|
||||
|
||||
# Headers in $(LIBXML2_INC) should not be checked with clang's -Wdocumentation.
|
||||
# Use -isystem instead of -I then.
|
||||
# FIXME: Could autoconf detect clang or availability of -isystem?
|
||||
ifneq ($(findstring -Wdocumentation,$(OPTIMIZE_OPTION)),)
|
||||
CPPFLAGS += $(subst -I,-isystem ,$(LIBXML2_INC))
|
||||
else
|
||||
CPPFLAGS += $(LIBXML2_INC)
|
||||
endif
|
|
@ -1,28 +0,0 @@
|
|||
##===- tools/clang-check/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
TOOLNAME = clang-check
|
||||
|
||||
# No plugins, optimize startup time.
|
||||
TOOL_NO_EXPORTS = 1
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
|
||||
instrumentation bitwriter support mc option
|
||||
USEDLIBS = clangFrontend.a clangCodeGen.a clangIndex.a \
|
||||
clangSerialization.a clangDriver.a \
|
||||
clangTooling.a clangParse.a clangSema.a \
|
||||
clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
|
||||
clangStaticAnalyzerCore.a clangAnalysis.a clangRewriteFrontend.a \
|
||||
clangRewrite.a clangEdit.a clangAST.a clangLex.a \
|
||||
clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,22 +0,0 @@
|
|||
##===- clang-format/Makefile -------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
TOOLNAME = clang-format
|
||||
|
||||
# No plugins, optimize startup time.
|
||||
TOOL_NO_EXPORTS = 1
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangFormat.a clangToolingCore.a clangDriver.a clangRewrite.a \
|
||||
clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
|
@ -1,26 +0,0 @@
|
|||
##===- tools/diagtool/Makefile -----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
TOOLNAME = diagtool
|
||||
|
||||
# No plugins, optimize startup time.
|
||||
TOOL_NO_EXPORTS := 1
|
||||
|
||||
# Don't install this.
|
||||
NO_INSTALL = 1
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
|
||||
clangSema.a clangAnalysis.a clangEdit.a clangAST.a clangLex.a \
|
||||
clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
##===- tools/driver/Makefile -------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
TOOLNAME = clang
|
||||
TOOLALIAS = clang++
|
||||
|
||||
ifdef CLANG_ORDER_FILE
|
||||
TOOL_ORDER_FILE := $(CLANG_ORDER_FILE)
|
||||
endif
|
||||
|
||||
# Include tool version information on OS X.
|
||||
TOOL_INFO_PLIST := Info.plist
|
||||
|
||||
# Include this here so we can get the configuration of the targets that have
|
||||
# been configured for construction. We have to do this early so we can set up
|
||||
# LINK_COMPONENTS before including Makefile.rules
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
|
||||
# Have the option of not supporting plugins. This is important for startup
|
||||
# performance.
|
||||
ifeq ($(CLANG_PLUGIN_SUPPORT), 1)
|
||||
NO_DEAD_STRIP := 1
|
||||
else
|
||||
TOOL_NO_EXPORTS := 1
|
||||
endif
|
||||
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
|
||||
instrumentation ipo irreader linker objcarcopts option \
|
||||
profiledata selectiondag
|
||||
USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
|
||||
clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
|
||||
clangRewriteFrontend.a clangRewrite.a
|
||||
|
||||
ifeq ($(ENABLE_CLANG_STATIC_ANALYZER),1)
|
||||
USEDLIBS += clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
|
||||
clangStaticAnalyzerCore.a
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_CLANG_ARCMT),1)
|
||||
USEDLIBS += clangARCMigrate.a
|
||||
endif
|
||||
|
||||
USEDLIBS += clangAnalysis.a clangEdit.a clangAST.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
# Set the tool version information values.
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
ifdef CLANG_VENDOR
|
||||
TOOL_INFO_NAME := $(CLANG_VENDOR) clang
|
||||
else
|
||||
TOOL_INFO_NAME := clang
|
||||
endif
|
||||
|
||||
ifdef CLANG_VENDOR_UTI
|
||||
TOOL_INFO_UTI := $(CLANG_VENDOR_UTI)
|
||||
else
|
||||
TOOL_INFO_UTI := org.llvm.clang
|
||||
endif
|
||||
|
||||
TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
|
||||
$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
|
||||
ifdef LLVM_SUBMIT_VERSION
|
||||
TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
|
||||
else
|
||||
TOOL_INFO_BUILD_VERSION :=
|
||||
endif
|
||||
endif
|
|
@ -1,64 +0,0 @@
|
|||
##===- tools/libclang/Makefile -----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
LIBRARYNAME = clang
|
||||
|
||||
EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
|
||||
|
||||
LINK_LIBS_IN_SHARED = 1
|
||||
SHARED_LIBRARY = 1
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter core \
|
||||
instrumentation ipo mc mcparser objcarcopts option support \
|
||||
object
|
||||
USEDLIBS = clangIndex.a clangARCMigrate.a \
|
||||
clangRewriteFrontend.a \
|
||||
clangFormat.a \
|
||||
clangTooling.a clangToolingCore.a \
|
||||
clangFrontend.a clangCodeGen.a clangDriver.a \
|
||||
clangSerialization.a \
|
||||
clangParse.a clangSema.a \
|
||||
clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
|
||||
clangRewrite.a \
|
||||
clangAnalysis.a clangEdit.a \
|
||||
clangASTMatchers.a \
|
||||
clangAST.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
# Add soname to the library.
|
||||
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD))
|
||||
LLVMLibsOptions += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT)
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_CLANG_ARCMT),1)
|
||||
CXX.Flags += -DCLANG_ENABLE_ARCMT
|
||||
endif
|
||||
|
||||
##===----------------------------------------------------------------------===##
|
||||
# FIXME: This is copied from the 'lto' makefile. Should we share this?
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
LLVMLibsOptions += -Wl,-compatibility_version,1
|
||||
|
||||
# Set dylib internal version number to submission number.
|
||||
ifdef LLVM_SUBMIT_VERSION
|
||||
LLVMLibsOptions += -Wl,-current_version \
|
||||
-Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
|
||||
endif
|
||||
|
||||
# If we're doing an Apple-style build, add the LTO object path.
|
||||
ifeq ($(RC_XBS),YES)
|
||||
TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/clang-lto.XXXXXX)
|
||||
LLVMLibsOptions += -Wl,-object_path_lto -Wl,$(TempFile)
|
||||
endif
|
||||
endif
|
|
@ -1,42 +0,0 @@
|
|||
SRCDIR := ..
|
||||
OBJDIR := .
|
||||
|
||||
CFLAGS = -Wall -DDEBUG -Dvariable="value with space" -I $(SRCDIR)/include
|
||||
LDFLAGS =
|
||||
PROGRAM = $(OBJDIR)/prg
|
||||
|
||||
$(OBJDIR)/main.o: $(SRCDIR)/main.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $(SRCDIR)/main.c
|
||||
|
||||
$(OBJDIR)/clean-one.o: $(SRCDIR)/clean-one.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $(SRCDIR)/clean-one.c
|
||||
|
||||
$(OBJDIR)/clean-two.o: $(SRCDIR)/clean-two.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $(SRCDIR)/clean-two.c
|
||||
|
||||
$(OBJDIR)/emit-one.o: $(SRCDIR)/emit-one.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $(SRCDIR)/emit-one.c
|
||||
|
||||
$(OBJDIR)/emit-two.o: $(SRCDIR)/emit-two.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $(SRCDIR)/emit-two.c
|
||||
|
||||
$(OBJDIR)/broken-one.o: $(SRCDIR)/broken-one.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $(SRCDIR)/broken-one.c
|
||||
|
||||
$(OBJDIR)/broken-two.o: $(SRCDIR)/broken-two.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $(SRCDIR)/broken-two.c
|
||||
|
||||
$(PROGRAM): $(OBJDIR)/main.o $(OBJDIR)/clean-one.o $(OBJDIR)/clean-two.o $(OBJDIR)/emit-one.o $(OBJDIR)/emit-two.o
|
||||
$(CC) $(LDFLAGS) -o $@ $(OBJDIR)/main.o $(OBJDIR)/clean-one.o $(OBJDIR)/clean-two.o $(OBJDIR)/emit-one.o $(OBJDIR)/emit-two.o
|
||||
|
||||
build_regular: $(PROGRAM)
|
||||
|
||||
build_clean: $(OBJDIR)/main.o $(OBJDIR)/clean-one.o $(OBJDIR)/clean-two.o
|
||||
|
||||
build_broken: $(OBJDIR)/main.o $(OBJDIR)/broken-one.o $(OBJDIR)/broken-two.o
|
||||
|
||||
build_all_in_one: $(SRCDIR)/main.c $(SRCDIR)/clean-one.c $(SRCDIR)/clean-two.c $(SRCDIR)/emit-one.c $(SRCDIR)/emit-two.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROGRAM) $(SRCDIR)/main.c $(SRCDIR)/clean-one.c $(SRCDIR)/clean-two.c $(SRCDIR)/emit-one.c $(SRCDIR)/emit-two.c
|
||||
|
||||
clean:
|
||||
rm -f $(PROGRAM) $(OBJDIR)/*.o
|
|
@ -1,53 +0,0 @@
|
|||
##===- tools/scan-build/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
ifeq ($(HOST_OS),MingW)
|
||||
Suffix := .bat
|
||||
endif
|
||||
|
||||
CLANG_INSTALL_SCANBUILD ?= 1
|
||||
|
||||
ifeq ($(CLANG_INSTALL_SCANBUILD), 1)
|
||||
InstallTargets := $(ToolDir)/scan-build$(Suffix) \
|
||||
$(LibexecDir)/c++-analyzer$(Suffix) \
|
||||
$(LibexecDir)/ccc-analyzer$(Suffix) \
|
||||
$(ShareDir)/scan-build/scanview.css \
|
||||
$(ShareDir)/scan-build/sorttable.js \
|
||||
$(ShareDir)/man/man1/scan-build.1
|
||||
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
InstallTargets := $(InstallTargets) $(ToolDir)/set-xcode-analyzer
|
||||
endif
|
||||
endif
|
||||
|
||||
all:: $(InstallTargets)
|
||||
|
||||
$(ToolDir)/%: bin/% Makefile $(ToolDir)/.dir
|
||||
$(Echo) "Copying $(notdir $<) to the 'bin' directory..."
|
||||
$(Verb)cp $< $@
|
||||
$(Verb)chmod +x $@
|
||||
|
||||
$(LibexecDir)/%: libexec/% Makefile $(LibexecDir)/.dir
|
||||
$(Echo) "Copying $(notdir $<) to the 'libexec' directory..."
|
||||
$(Verb)cp $< $@
|
||||
$(Verb)chmod +x $@
|
||||
|
||||
$(ShareDir)/man/man1/%: man/% Makefile $(ShareDir)/man/man1/.dir
|
||||
$(Echo) "Copying $(notdir $<) to the 'man' directory..."
|
||||
$(Verb)cp $< $@
|
||||
|
||||
$(ShareDir)/scan-build/%: share/scan-build/% Makefile $(ShareDir)/scan-build/.dir
|
||||
$(Echo) "Copying $(notdir $<) to the 'share' directory..."
|
||||
$(Verb)cp $< $@
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
##===- tools/scan-view/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL := ../..
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
CLANG_INSTALL_SCANVIEW ?= 1
|
||||
|
||||
ifeq ($(CLANG_INSTALL_SCANVIEW), 1)
|
||||
InstallTargets := $(ToolDir)/scan-view \
|
||||
$(ShareDir)/scan-view/Reporter.py \
|
||||
$(ShareDir)/scan-view/ScanView.py \
|
||||
$(ShareDir)/scan-view/startfile.py \
|
||||
$(ShareDir)/scan-view/FileRadar.scpt \
|
||||
$(ShareDir)/scan-view/GetRadarVersion.scpt \
|
||||
$(ShareDir)/scan-view/bugcatcher.ico
|
||||
endif
|
||||
|
||||
all:: $(InstallTargets)
|
||||
|
||||
$(ToolDir)/%: bin/% Makefile $(ToolDir)/.dir
|
||||
$(Echo) "Copying $(notdir $<) to the 'bin' directory..."
|
||||
$(Verb)cp $< $@
|
||||
$(Verb)chmod +x $@
|
||||
|
||||
$(ShareDir)/scan-view/%: share/% Makefile $(ShareDir)/scan-view/.dir
|
||||
$(Echo) "Copying $(notdir $<) to the 'share' directory..."
|
||||
$(Verb)cp $< $@
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
##===- unittests/AST/Makefile ------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = AST
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
|
||||
clangRewrite.a clangRewriteFrontend.a \
|
||||
clangParse.a clangSema.a clangAnalysis.a \
|
||||
clangEdit.a clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,22 +0,0 @@
|
|||
##===- unittests/ASTMatchers/Dynamic/Makefile --------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../../..
|
||||
|
||||
TESTNAME = DynamicASTMatchers
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
|
||||
clangRewrite.a clangRewriteFrontend.a clangParse.a clangSema.a \
|
||||
clangDynamicASTMatchers.a \
|
||||
clangAnalysis.a clangEdit.a clangAST.a clangASTMatchers.a \
|
||||
clangLex.a \
|
||||
clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,22 +0,0 @@
|
|||
##===- unittests/ASTMatchers/Makefile ----------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
|
||||
PARALLEL_DIRS = Dynamic
|
||||
|
||||
TESTNAME = ASTMatchers
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
|
||||
clangRewrite.a clangRewriteFrontend.a \
|
||||
clangParse.a clangSema.a clangAnalysis.a \
|
||||
clangEdit.a clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,15 +0,0 @@
|
|||
##===- unittests/Basic/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = Basic
|
||||
LINK_COMPONENTS := support mc
|
||||
USEDLIBS = clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,20 +0,0 @@
|
|||
##===- unittests/CodeGen/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = CodeGen
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader mc option \
|
||||
profiledata support
|
||||
USEDLIBS = clangCodeGen.a clangFrontend.a clangSerialization.a \
|
||||
clangDriver.a \
|
||||
clangParse.a clangSema.a clangAnalysis.a \
|
||||
clangEdit.a clangAST.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,16 +0,0 @@
|
|||
##===- unittests/Driver/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = Multilib
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) support option
|
||||
USEDLIBS = clangDriver.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,19 +0,0 @@
|
|||
##===- unittests/Format/Makefile ---------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = Format
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangFormat.a clangTooling.a clangToolingCore.a clangFrontend.a \
|
||||
clangSerialization.a clangDriver.a clangParse.a clangRewrite.a \
|
||||
clangRewriteFrontend.a clangSema.a clangAnalysis.a clangEdit.a \
|
||||
clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,21 +0,0 @@
|
|||
##===- unittests/Frontend/Makefile -------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = Frontend
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
|
||||
clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
|
||||
clangStaticAnalyzerCheckers.a clangStaticAnalyzerCore.a \
|
||||
clangARCMigrate.a clangRewrite.a \
|
||||
clangRewriteFrontend.a clangEdit.a \
|
||||
clangAnalysis.a clangAST.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,16 +0,0 @@
|
|||
##===- unittests/Lex/Makefile ------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = Lex
|
||||
LINK_COMPONENTS := mcparser support mc bitreader
|
||||
USEDLIBS = clangParse.a clangSema.a clangAnalysis.a clangEdit.a \
|
||||
clangSerialization.a clangAST.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,35 +0,0 @@
|
|||
##===- unittests/Makefile ----------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
# If CLANG_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
|
||||
# are being included from a subdirectory makefile.
|
||||
|
||||
ifndef CLANG_LEVEL
|
||||
|
||||
IS_UNITTEST_LEVEL := 1
|
||||
CLANG_LEVEL := ..
|
||||
PARALLEL_DIRS = CodeGen Basic Lex Driver Format ASTMatchers AST Tooling \
|
||||
Rewrite Sema
|
||||
|
||||
include $(CLANG_LEVEL)/../..//Makefile.config
|
||||
|
||||
ifeq ($(ENABLE_CLANG_ARCMT),1)
|
||||
PARALLEL_DIRS += Frontend libclang StaticAnalyzer
|
||||
endif
|
||||
|
||||
endif # CLANG_LEVEL
|
||||
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
ifndef IS_UNITTEST_LEVEL
|
||||
|
||||
MAKEFILE_UNITTEST_NO_INCLUDE_COMMON := 1
|
||||
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
|
||||
|
||||
endif # IS_UNITTEST_LEVEL
|
|
@ -1,16 +0,0 @@
|
|||
##===- unittests/Rewrite/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = Rewrite
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) support
|
||||
USEDLIBS = clangRewrite.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,19 +0,0 @@
|
|||
##===- unittests/Sema/Makefile -----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = Sema
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
|
||||
clangRewrite.a clangRewriteFrontend.a \
|
||||
clangParse.a clangSema.a clangAnalysis.a \
|
||||
clangEdit.a clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,15 +0,0 @@
|
|||
##===- unittests/Basic/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = StaticAnalysis
|
||||
LINK_COMPONENTS := support mc
|
||||
USEDLIBS = clangBasic.a clangAnalysis.a clangStaticAnalyzerCore.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,20 +0,0 @@
|
|||
##===- unittests/Tooling/Makefile --------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = Tooling
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
|
||||
USEDLIBS = clangTooling.a clangToolingCore.a clangFrontend.a \
|
||||
clangSerialization.a clangDriver.a \
|
||||
clangParse.a clangRewrite.a clangRewriteFrontend.a \
|
||||
clangSema.a clangAnalysis.a clangEdit.a \
|
||||
clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,37 +0,0 @@
|
|||
##===- unittests/libclang/Makefile -------------------------*- Makefile -*-===##
|
||||
#
|
||||
# The LLVM Compiler Infrastructure
|
||||
#
|
||||
# This file is distributed under the University of Illinois Open Source
|
||||
# License. See LICENSE.TXT for details.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
CLANG_LEVEL = ../..
|
||||
TESTNAME = libclang
|
||||
LINK_LIBS_IN_SHARED := 1
|
||||
|
||||
include $(CLANG_LEVEL)/../../Makefile.config
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) \
|
||||
AsmParser \
|
||||
BitReader \
|
||||
BitWriter \
|
||||
IPO \
|
||||
MC \
|
||||
ObjCArcOpts \
|
||||
Option \
|
||||
Support
|
||||
|
||||
# Note that 'USEDLIBS' must include all of the core clang libraries
|
||||
# when -static is given to linker on cygming.
|
||||
USEDLIBS = clang.a \
|
||||
clangCodeGen.a \
|
||||
clangIndex.a clangFormat.a clangRewrite.a \
|
||||
clangFrontend.a clangDriver.a \
|
||||
clangTooling.a \
|
||||
clangToolingCore.a \
|
||||
clangSerialization.a clangParse.a clangSema.a \
|
||||
clangAnalysis.a clangEdit.a clangAST.a clangLex.a \
|
||||
clangBasic.a
|
||||
|
||||
include $(CLANG_LEVEL)/unittests/Makefile
|
|
@ -1,170 +0,0 @@
|
|||
# -*- Makefile -*-
|
||||
|
||||
# Usage: make test.N.report
|
||||
#
|
||||
# COUNT can be over-ridden to change the number of tests generated per
|
||||
# file, and TESTARGS is used to change the type generation. Make sure
|
||||
# to 'make clean' after changing either of these parameters.
|
||||
|
||||
TESTARGS := --no-unsigned --no-vector --no-complex --no-bool
|
||||
|
||||
COUNT := 1
|
||||
TIMEOUT := 5
|
||||
|
||||
CFLAGS := -std=gnu99
|
||||
|
||||
X_COMPILER := gcc
|
||||
X_LL_CFLAGS := -emit-llvm -S
|
||||
Y_COMPILER := clang
|
||||
Y_LL_CFLAGS := -emit-llvm -S
|
||||
CC := gcc
|
||||
|
||||
###
|
||||
|
||||
ABITESTGEN := ../ABITestGen.py
|
||||
|
||||
ifndef VERBOSE
|
||||
Verb := @
|
||||
endif
|
||||
|
||||
.PHONY: test.%.report
|
||||
test.%.report: temps/test.%.xx.diff temps/test.%.xy.diff temps/test.%.yx.diff temps/test.%.yy.diff
|
||||
@ok=1;\
|
||||
for t in $^; do \
|
||||
if [ -s $$t ]; then \
|
||||
echo "TEST $*: $$t failed"; \
|
||||
ok=0;\
|
||||
fi; \
|
||||
done; \
|
||||
if [ $$ok -eq 1 ]; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi
|
||||
|
||||
|
||||
.PHONY: test.%.defs-report
|
||||
test.%.defs-report: temps/test.%.defs.diff
|
||||
@for t in $^; do \
|
||||
if [ -s $$t ]; then \
|
||||
echo "TEST $*: $$t failed"; \
|
||||
cat $$t; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
.PHONY: test.%.build
|
||||
test.%.build: temps/test.%.ref temps/test.%.xx temps/test.%.xy temps/test.%.yx temps/test.%.yy temps/test.%.x.defs temps/test.%.y.defs
|
||||
@true
|
||||
|
||||
###
|
||||
|
||||
# Diffs and output
|
||||
|
||||
.PRECIOUS: temps/.dir
|
||||
|
||||
.PRECIOUS: temps/test.%.xx.diff
|
||||
temps/test.%.xx.diff: temps/test.%.ref.out temps/test.%.xx.out
|
||||
$(Verb) diff $^ > $@ || true
|
||||
.PRECIOUS: temps/test.%.xy.diff
|
||||
temps/test.%.xy.diff: temps/test.%.ref.out temps/test.%.xy.out
|
||||
$(Verb) diff $^ > $@ || true
|
||||
.PRECIOUS: temps/test.%.yx.diff
|
||||
temps/test.%.yx.diff: temps/test.%.ref.out temps/test.%.yx.out
|
||||
$(Verb) diff $^ > $@ || true
|
||||
.PRECIOUS: temps/test.%.yy.diff
|
||||
temps/test.%.yy.diff: temps/test.%.ref.out temps/test.%.yy.out
|
||||
$(Verb) diff $^ > $@ || true
|
||||
.PRECIOUS: temps/test.%.defs.diff
|
||||
temps/test.%.defs.diff: temps/test.%.x.defs temps/test.%.y.defs
|
||||
$(Verb) zipdifflines \
|
||||
--replace "%struct.T[0-9]+" "%struct.s" \
|
||||
--replace "%union.T[0-9]+" "%struct.s" \
|
||||
--replace "byval align [0-9]+" "byval" \
|
||||
$^ > $@
|
||||
|
||||
.PRECIOUS: temps/test.%.out
|
||||
temps/test.%.out: temps/test.%
|
||||
-$(Verb) ./$< > $@
|
||||
|
||||
# Executables
|
||||
|
||||
.PRECIOUS: temps/test.%.ref
|
||||
temps/test.%.ref: temps/test.%.driver.ref.o temps/test.%.a.ref.o temps/test.%.b.ref.o
|
||||
$(Verb) $(CC) $(CFLAGS) $(CC_CFLAGS) -O3 -o $@ $^
|
||||
.PRECIOUS: temps/test.%.xx
|
||||
temps/test.%.xx: temps/test.%.driver.ref.o temps/test.%.a.x.o temps/test.%.b.x.o
|
||||
$(Verb) $(CC) $(CFLAGS) $(CC_CFLAGS) -O3 -o $@ $^
|
||||
.PRECIOUS: temps/test.%.xy
|
||||
temps/test.%.xy: temps/test.%.driver.ref.o temps/test.%.a.x.o temps/test.%.b.y.o
|
||||
$(Verb) $(CC) $(CFLAGS) $(CC_CFLAGS) -O3 -o $@ $^
|
||||
.PRECIOUS: temps/test.%.yx
|
||||
temps/test.%.yx: temps/test.%.driver.ref.o temps/test.%.a.y.o temps/test.%.b.x.o
|
||||
$(Verb) $(CC) $(CFLAGS) $(CC_CFLAGS) -O3 -o $@ $^
|
||||
.PRECIOUS: temps/test.%.yy
|
||||
temps/test.%.yy: temps/test.%.driver.ref.o temps/test.%.a.y.o temps/test.%.b.y.o
|
||||
$(Verb) $(CC) $(CFLAGS) $(CC_CFLAGS) -O3 -o $@ $^
|
||||
|
||||
# Object files
|
||||
|
||||
.PRECIOUS: temps/test.%.ref.o
|
||||
temps/test.%.ref.o: inputs/test.%.c temps/.dir
|
||||
$(Verb) $(CC) -c $(CFLAGS) $(CC_CFLAGS) -o $@ $<
|
||||
.PRECIOUS: temps/test.%.x.o
|
||||
temps/test.%.x.o: inputs/test.%.c temps/.dir
|
||||
$(Verb) $(X_COMPILER) -c $(CFLAGS) $(X_CFLAGS) -o $@ $<
|
||||
.PRECIOUS: temps/test.%.y.o
|
||||
temps/test.%.y.o: inputs/test.%.c temps/.dir
|
||||
$(Verb) $(Y_COMPILER) -c $(CFLAGS) $(Y_CFLAGS) -o $@ $<
|
||||
|
||||
.PRECIOUS: temps/test.%.x.defs
|
||||
temps/test.%.x.defs: temps/test.%.a.x.ll temps/.dir
|
||||
-$(Verb) -grep '^define ' $< > $@
|
||||
.PRECIOUS: temps/test.%.y.defs
|
||||
temps/test.%.y.defs: temps/test.%.a.y.ll temps/.dir
|
||||
-$(Verb) -grep '^define ' $< > $@
|
||||
|
||||
.PRECIOUS: temps/test.%.a.x.ll
|
||||
temps/test.%.a.x.ll: inputs/test.%.a.c temps/.dir
|
||||
$(Verb) $(X_COMPILER) $(CFLAGS) $(X_LL_CFLAGS) $(X_CFLAGS) -o $@ $<
|
||||
.PRECIOUS: temps/test.%.b.x.ll
|
||||
temps/test.%.b.x.ll: inputs/test.%.b.c temps/.dir
|
||||
$(Verb) $(X_COMPILER) $(CFLAGS) $(X_LL_CFLAGS) $(X_CFLAGS) -o $@ $<
|
||||
.PRECIOUS: temps/test.%.a.y.ll
|
||||
temps/test.%.a.y.ll: inputs/test.%.a.c temps/.dir
|
||||
$(Verb) $(Y_COMPILER) $(CFLAGS) $(Y_LL_CFLAGS) $(Y_CFLAGS) -o $@ $<
|
||||
.PRECIOUS: temps/test.%.b.y.ll
|
||||
temps/test.%.b.y.ll: inputs/test.%.b.c temps/.dir
|
||||
$(Verb) $(Y_COMPILER) $(CFLAGS) $(Y_LL_CFLAGS) $(Y_CFLAGS) -o $@ $<
|
||||
|
||||
# Input generation
|
||||
|
||||
.PHONY: test.%.top
|
||||
test.%.top: inputs/test.%.a.c inputs/test.%.b.c inputs/test.%.driver.c
|
||||
@true
|
||||
|
||||
.PRECIOUS: inputs/test.%.a.c inputs/test.%.b.c inputs/test.%.driver.c
|
||||
inputs/test.%.a.c: test.%.generate
|
||||
@true
|
||||
inputs/test.%.b.c: test.%.generate
|
||||
@true
|
||||
inputs/test.%.driver.c: test.%.generate
|
||||
@true
|
||||
|
||||
.PHONY: test.%.generate
|
||||
.PRECIOUS: inputs/.dir
|
||||
test.%.generate: $(ABITESTGEN) inputs/.dir
|
||||
$(Verb) $(ABITESTGEN) $(TESTARGS) -o inputs/test.$*.a.c -T inputs/test.$*.b.c -D inputs/test.$*.driver.c --min=$(shell expr $* '*' $(COUNT)) --count=$(COUNT)
|
||||
|
||||
# Cleaning
|
||||
|
||||
clean-temps:
|
||||
$(Verb) rm -rf temps
|
||||
|
||||
clean:
|
||||
$(Verb) rm -rf temps inputs
|
||||
|
||||
# Etc.
|
||||
|
||||
%/.dir:
|
||||
$(Verb) mkdir -p $* > /dev/null
|
||||
$(Verb) $(DATE) > $@
|
|
@ -1,68 +0,0 @@
|
|||
# Usage: make test.N.report
|
||||
#
|
||||
# COUNT can be over-ridden to change the number of tests generated per
|
||||
# file, and TESTARGS is used to change the type generation. Make sure
|
||||
# to 'make clean' after changing either of these parameters.
|
||||
|
||||
ABITESTGEN := ../ABITestGen.py
|
||||
TESTARGS := --max-args 0 --test-layout
|
||||
COUNT := 1000
|
||||
TIMEOUT := 5
|
||||
|
||||
CFLAGS := -std=gnu99
|
||||
|
||||
X_COMPILER := llvm-gcc
|
||||
Y_COMPILER := clang
|
||||
CC := gcc
|
||||
|
||||
ifeq (0, 0)
|
||||
X_CFLAGS := -m32
|
||||
Y_CFLAGS := -m32
|
||||
CC_CFLAGS := -m32
|
||||
else
|
||||
X_CFLAGS := -m64
|
||||
Y_CFLAGS := -m64
|
||||
CC_CFLAGS := -m64
|
||||
endif
|
||||
|
||||
.PHONY: test.%.report
|
||||
test.%.report: test.%.x.diff test.%.y.diff
|
||||
@for t in $^; do \
|
||||
if [ -s $$t ]; then \
|
||||
echo "TEST $*: $$t failed"; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
.PHONY: test.%.build
|
||||
test.%.build: test.%.ref test.%.x test.%.y
|
||||
@true
|
||||
|
||||
###
|
||||
|
||||
.PRECIOUS: test.%.x.diff
|
||||
test.%.x.diff: test.%.ref.out test.%.x.out
|
||||
-diff $^ > $@
|
||||
.PRECIOUS: test.%.y.diff
|
||||
test.%.y.diff: test.%.ref.out test.%.y.out
|
||||
-diff $^ > $@
|
||||
|
||||
.PRECIOUS: test.%.out
|
||||
test.%.out: test.%
|
||||
-./$< > $@
|
||||
|
||||
.PRECIOUS: test.%.ref
|
||||
test.%.ref: test.%.c
|
||||
$(CC) $(CFLAGS) $(CC_CFLAGS) -o $@ $^
|
||||
.PRECIOUS: test.%.x
|
||||
test.%.x: test.%.c
|
||||
$(X_COMPILER) $(CFLAGS) $(X_CFLAGS) -o $@ $^
|
||||
.PRECIOUS: test.%.y
|
||||
test.%.y: test.%.c
|
||||
$(Y_COMPILER) $(CFLAGS) $(Y_CFLAGS) -o $@ $^
|
||||
|
||||
.PRECIOUS: test.%.c
|
||||
test.%.c: $(ABITESTGEN)
|
||||
$(ABITESTGEN) $(TESTARGS) -o $@ --min=$(shell expr $* '*' $(COUNT)) --count=$(COUNT)
|
||||
|
||||
clean:
|
||||
rm -f test.* *~
|
|
@ -1,7 +0,0 @@
|
|||
X_CFLAGS := -m32
|
||||
Y_CFLAGS := -m32
|
||||
CC_CFLAGS := -m32
|
||||
|
||||
include ../Makefile.test.common
|
||||
|
||||
TESTARGS += --max-args 0
|
|
@ -1,7 +0,0 @@
|
|||
X_CFLAGS := -m64
|
||||
Y_CFLAGS := -m64
|
||||
CC_CFLAGS := -m64
|
||||
|
||||
include ../Makefile.test.common
|
||||
|
||||
TESTARGS += --max-args 0
|
|
@ -1,7 +0,0 @@
|
|||
X_CFLAGS := -m32
|
||||
Y_CFLAGS := -m32
|
||||
CC_CFLAGS := -m32
|
||||
|
||||
include ../Makefile.test.common
|
||||
|
||||
TESTARGS += --no-function-return --max-args 1
|
|
@ -1,13 +0,0 @@
|
|||
# Usage: make test.N.report
|
||||
#
|
||||
# COUNT can be over-ridden to change the number of tests generated per
|
||||
# file, and TESTARGS is used to change the type generation. Make sure
|
||||
# to 'make clean' after changing either of these parameters.
|
||||
|
||||
X_CFLAGS := -m64
|
||||
Y_CFLAGS := -m64
|
||||
CC_CFLAGS := -m64
|
||||
|
||||
include ../Makefile.test.common
|
||||
|
||||
TESTARGS += --no-function-return --max-args 1
|
|
@ -1,17 +0,0 @@
|
|||
##===- utils/TableGen/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 = clang-tblgen
|
||||
USEDLIBS = LLVMTableGen.a LLVMSupport.a
|
||||
|
||||
# This tool has no plugins, optimize startup time.
|
||||
TOOL_NO_EXPORTS = 1
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
|
@ -1,24 +0,0 @@
|
|||
GXX := llvm-g++-4.2
|
||||
CLANGXX := clang++
|
||||
|
||||
all: one
|
||||
|
||||
test.cc: gen.cc
|
||||
g++ gen.cc -o gen
|
||||
./gen >test.cc
|
||||
|
||||
test-gcc.sum: test.cc
|
||||
time $(GXX) test.cc -o test-gcc.s -S
|
||||
$(GXX) test-gcc.s -o test-gcc
|
||||
./test-gcc >test-gcc.sum
|
||||
|
||||
test-clang.sum: test.cc
|
||||
time $(CLANGXX) test.cc -o test-clang.s -S
|
||||
$(CLANGXX) test-clang.s -o test-clang
|
||||
./test-clang >test-clang.sum
|
||||
|
||||
one: test-gcc.sum test-clang.sum
|
||||
cmp test-gcc.sum test-clang.sum
|
||||
|
||||
clean:
|
||||
rm -f gen test-gcc test-clang test.cc test-gcc.sum test-clang.sum test-gcc.s test-clang.s
|
Loading…
Reference in New Issue