summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-03-06 09:22:29 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-03-06 09:22:29 +0000
commit9bef28eb9e224d641ce31a423e215ccf82bf1d43 (patch)
tree542734eaa7870f95912cbaebccb87dbec0c20b4f /tools
parent8230c40430a1325b5cc5bc0221931487b4bd573c (diff)
downloadFreeBSD-src-9bef28eb9e224d641ce31a423e215ccf82bf1d43.zip
FreeBSD-src-9bef28eb9e224d641ce31a423e215ccf82bf1d43.tar.gz
Update LLVM to r97873.
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile26
-rw-r--r--tools/llvm-config/Makefile4
-rw-r--r--tools/llvmc/doc/LLVMC-Reference.rst26
-rw-r--r--tools/llvmc/plugins/Base/Base.td.in8
4 files changed, 38 insertions, 26 deletions
diff --git a/tools/Makefile b/tools/Makefile
index b6637a9..86ba72d 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -21,8 +21,8 @@ PARALLEL_DIRS := opt llvm-as llvm-dis \
llvm-ld llvm-prof llvm-link \
lli llvm-extract \
bugpoint llvm-bcanalyzer llvm-stub \
- llvm-mc llvmc \
- edis
+ llvm-mc llvmc
+
# Let users override the set of tools to build from the command line.
ifdef ONLY_TOOLS
@@ -32,18 +32,24 @@ endif
include $(LEVEL)/Makefile.config
+# These libraries build as dynamic libraries (.dylib /.so), they can only be
+# built if ENABLE_PIC is set.
ifeq ($(ENABLE_PIC),1)
- DIRS += lto
- ifdef BINUTILS_INCDIR
- DIRS += gold
+ # No support for dynamic libraries on windows targets.
+ ifneq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW))
+ PARALLEL_DIRS += edis
+
+ # gold only builds if binutils is around. It requires "lto" to build before
+ # it so it is added to DIRS.
+ ifdef BINUTILS_INCDIR
+ PARALLEL_DIRS += gold
+ DIRS += lto
+ else
+ PARALLEL_DIRS += lto
+ endif
endif
endif
-# No support for lto / gold on windows targets
-ifeq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW))
- DIRS := $(filter-out lto gold, $(DIRS))
-endif
-
# Only build edis if X86 target support is enabled.
ifeq ($(filter $(TARGETS_TO_BUILD), X86),)
PARALLEL_DIRS := $(filter-out edis, $(PARALLEL_DIRS))
diff --git a/tools/llvm-config/Makefile b/tools/llvm-config/Makefile
index cc5cf43..c7f7b32 100644
--- a/tools/llvm-config/Makefile
+++ b/tools/llvm-config/Makefile
@@ -126,6 +126,6 @@ clean-local::
$(LibDeps) GenLibDeps.out
install-local:: all-local
$(Echo) Installing llvm-config
- $(Verb) $(MKDIR) $(PROJ_bindir)
- $(Verb) $(ScriptInstall) $(ToolDir)/llvm-config $(PROJ_bindir)
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_bindir)
+ $(Verb) $(ScriptInstall) $(ToolDir)/llvm-config $(DESTDIR)$(PROJ_bindir)
diff --git a/tools/llvmc/doc/LLVMC-Reference.rst b/tools/llvmc/doc/LLVMC-Reference.rst
index dfe3898..ca8500d 100644
--- a/tools/llvmc/doc/LLVMC-Reference.rst
+++ b/tools/llvmc/doc/LLVMC-Reference.rst
@@ -329,16 +329,22 @@ separate option groups syntactically.
- ``required`` - this option must be specified exactly once (or, in case of
the list options without the ``multi_val`` property, at least
- once). Incompatible with ``zero_or_one`` and ``one_or_more``.
-
- - ``one_or_more`` - the option must be specified at least one time. Useful
- only for list options in conjunction with ``multi_val``; for ordinary lists
- it is synonymous with ``required``. Incompatible with ``required`` and
- ``zero_or_one``.
-
- - ``optional`` - the option can be specified zero or one times. Useful only
- for list options in conjunction with ``multi_val``. Incompatible with
- ``required`` and ``one_or_more``.
+ once). Incompatible with ``optional`` and ``one_or_more``.
+
+ - ``optional`` - the option can be specified either zero times or exactly
+ once. The default for switch options. Useful only for list options in
+ conjunction with ``multi_val``. Incompatible with ``required``,
+ ``zero_or_more`` and ``one_or_more``.
+
+ - ``one_or_more`` - the option must be specified at least once. Can be useful
+ to allow switch options be both obligatory and be specified multiple
+ times. For list options is useful only in conjunction with ``multi_val``;
+ for ordinary it is synonymous with ``required``. Incompatible with
+ ``required``, ``optional`` and ``zero_or_more``.
+
+ - ``zero_or_more`` - the option can be specified zero or more times. Useful
+ to allow a single switch option to be specified more than
+ once. Incompatible with ``required``, ``optional`` and ``one_or_more``.
- ``hidden`` - the description of this option will not appear in
the ``--help`` output (but will appear in the ``--help-hidden``
diff --git a/tools/llvmc/plugins/Base/Base.td.in b/tools/llvmc/plugins/Base/Base.td.in
index 7b82313..ac0f665 100644
--- a/tools/llvmc/plugins/Base/Base.td.in
+++ b/tools/llvmc/plugins/Base/Base.td.in
@@ -25,13 +25,13 @@ def OptList : OptionList<[
(switch_option "opt",
(help "Enable opt")),
(switch_option "O0",
- (help "Turn off optimization")),
+ (help "Turn off optimization"), (zero_or_more)),
(switch_option "O1",
- (help "Optimization level 1")),
+ (help "Optimization level 1"), (zero_or_more)),
(switch_option "O2",
- (help "Optimization level 2")),
+ (help "Optimization level 2"), (zero_or_more)),
(switch_option "O3",
- (help "Optimization level 3")),
+ (help "Optimization level 3"), (zero_or_more)),
(switch_option "S",
(help "Stop after compilation, do not assemble")),
(switch_option "c",
OpenPOWER on IntegriCloud