Commit Graph

96 Commits

Author SHA1 Message Date
J. Ryan Stinnett
78762bc380 [Docs] Modernize references to macOS
Summary:
This updates all places in documentation that refer to "Mac OS X", "OS X", etc.
to instead use the modern name "macOS" when no specific version number is
mentioned.

If a specific version is mentioned, this attempts to use the OS name at the time
of that version:

* Mac OS X for 10.0 - 10.7
* OS X for 10.8 - 10.11
* macOS for 10.12 - present

Reviewers: JDevlieghere

Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits

Tags: #clang, #lldb, #libc, #llvm

Differential Revision: https://reviews.llvm.org/D62654

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362113 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-30 16:46:22 +00:00
Saleem Abdulrasool
86b49e2b74 build: add option to disable unwind tables
The unwind tables (`.eh_frame`, `.arm.extab`) add a significant chunk of data to
the final binaries.  These should not be needed normally, particularly when
exceptions are disabled.  This enables shrinking `lldb-server` by ~18% (3 MiB)
when built with gold.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359819 91177308-0d34-0410-b5e6-96231b3b80d8
2019-05-02 19:37:26 +00:00
Justin Bogner
9736ffc02a [CMake] Replace LLVM_ENABLE_CXX1Y and friends with LLVM_CXX_STD
Simplify building with particular C++ standards by replacing the
specific "enable standard X" flags with a flag that allows specifying
the standard you want directly.

We preserve compatibility with the existing flags so that anyone with
those flags in existing caches won't break mysteriously.

Differential Revision: https://reviews.llvm.org/D60399

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357899 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-08 10:19:17 +00:00
Shoaib Meenai
92fd281169 [docs] Document LLVM_ENABLE_IDE
Use some of the wording and the motivating example from r344555. The
lack of documentation was pointed out by Roman Lebedev.

Differential Revision: https://reviews.llvm.org/D58286

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354167 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-15 20:40:26 +00:00
Rong Xu
52585b5d4c [Cmake] Add an option to build LLVM using the experimental new pass manager
Add LLVM_USE_NEWPM to build LLVM using the experimental new pass manager.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353550 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-08 19:31:03 +00:00
JF Bastien
33c30c0b09 Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

Differential Revision: https://reviews.llvm.org/D57264

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353374 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-07 05:20:00 +00:00
JF Bastien
7ab3c4f085 Revert "Bump minimum toolchain version"
Reverting D57264 again, it looks like we're down to two bots that need fixing:

polly-amd64-linux
polly-arm-linux

They both have old versions of libstdc++ and recent clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352954 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-02 06:01:12 +00:00
JF Bastien
d9a8f328e9 Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

Differential Revision: https://reviews.llvm.org/D57264

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352951 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-02 05:15:34 +00:00
JF Bastien
75542197bc Revert "Bump minimum toolchain version"
Looks like we still have a few bots that are sad. Let try to get them fixed!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352835 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-01 04:44:39 +00:00
JF Bastien
67afd3256e Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

Differential Revision: https://reviews.llvm.org/D57264

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352834 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-01 04:33:21 +00:00
JF Bastien
d217469872 Revert "Bump minimum toolchain version"
A handful of bots are still breaking, either because I missed them in my audit,
they were offline, or something else. I'm contacting their authors, but I'll
revert for now and re-commit later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352814 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-31 23:29:39 +00:00
JF Bastien
ba55936f14 Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
  http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

This patch therefore bumps the toolchain versions according to our policy:
  llvm.org/docs/DeveloperPolicy.html#toolchain

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

Differential Revision: https://reviews.llvm.org/D57264

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352811 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-31 23:13:10 +00:00
JF Bastien
0a9f6969d5 [NFC] Factor out + document build requirements
Summary: This change factors out compiler checking / warning, and documents LLVM_FORCE_USE_OLD_TOOLCHAIN. It doesn't introduce any functional changes nor policy changes, these will come late.

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D56799

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351387 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-16 22:22:38 +00:00
Mark Searles
0333e48f08 Fix typo: "with he MODULE" -> "with the MODULE"
Differential Revision: https://reviews.llvm.org/D56302

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350400 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-04 16:35:01 +00:00
Tom Stellard
69e8318af3 cmake: Remove add_llvm_loadable_module()
Summary:
This function is very similar to add_llvm_library(),  so this patch merges it
into add_llvm_library() and replaces all calls to add_llvm_loadable_module(lib ...)
with add_llvm_library(lib MODULE ...)

Reviewers: philip.pfaffe, beanz, chandlerc

Reviewed By: philip.pfaffe

Subscribers: chapuni, mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D51748

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349839 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-20 22:04:08 +00:00
Reid Kleckner
cb88bb7c68 [benchmark] Re-enable benchmarks on all platforms including Windows
The assertion in MCCodeView.cpp was resolved in r340878.

This reverts both r340905 and r340836, making benchmarks build by
default everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341716 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 21:47:00 +00:00
Matthias Braun
64a07d9117 Revamp test-suite documentation
- Remove duplication: Both TestingGuide and TestSuiteMakefileGuide
  would give a similar overview over the test-suite.
- Present cmake/lit as the default/normal way of running the test-suite:
- Move information about the cmake/lit testsuite into the new
  TestSuiteGuide.rst file. Mark the remaining information in
  TestSuiteMakefilesGuide.rst as deprecated.
- General simplification and shorting of language.
- Remove paragraphs about tests known to fail as everything should pass
  nowadays.
- Remove paragraph about zlib requirement; it's not required anymore
  since we copied a zlib source snapshot into the test-suite.
- Remove paragraph about comparison with "native compiler". Correctness is
  always checked against reference outputs nowadays.
- Change cmake/lit quickstart section to recommend `pip` for installing
  lit and use `CMAKE_C_COMPILER` and a cache file in the example as that
  is what most people will end up doing anyway. Also a section about
  compare.py to quickstart.
- Document `Bitcode` and `MicroBenchmarks` directories.
- Add section with commonly used cmake configuration options.
- Add section about showing and comparing result files via compare.py.
- Add section about using external benchmark suites.
- Add section about using custom benchmark suites.
- Add section about profile guided optimization.
- Add section about cross-compilation and running on external devices.

Differential Revision: https://reviews.llvm.org/D51465

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341260 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-31 21:47:01 +00:00
Kirill Bobyrev
0d21b88888 [benchmark] NFC: Turn benchmark ON on all non-Windows buildbots
The problems with benchmark build should be fixed now, but Windows
buildbots still run into errors seemingly because of the bug in
clang-cl. Because of that, benchmark shouldn't be built on Windows at
this point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340905 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-29 08:59:36 +00:00
Kirill Bobyrev
5a575ac79e [benchmark] Stop building benchmarks by default
Although the benchmark regex-related build issue seems to be
fixed, it appears that benchmark library triggers some stage 2 clang-cl
bugs:

http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/13495/steps/build%20stage%202/logs/stdio

The only sensible option now is to prevent benchmark library from
building in the default configuration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340836 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 15:36:50 +00:00
Kirill Bobyrev
18c6fab107 Pull google/benchmark library to the LLVM tree
This patch pulls google/benchmark v1.4.1 into the LLVM tree so that any
project could use it for benchmark generation. A dummy benchmark is
added to `llvm/benchmarks/DummyYAML.cpp` to validate the correctness of
the build process.

The current version does not utilize LLVM LNT and LLVM CMake
infrastructure, but that might be sufficient for most users. Two
introduced CMake variables:

* `LLVM_INCLUDE_BENCHMARKS` (`ON` by default) generates benchmark
  targets
* `LLVM_BUILD_BENCHMARKS` (`OFF` by default) adds generated
  benchmark targets to the list of default LLVM targets (i.e. if `ON`
  benchmarks will be built upon standard build invocation, e.g. `ninja` or
  `make` with no specific targets)

List of modifications:

* `BENCHMARK_ENABLE_TESTING` is disabled
* `BENCHMARK_ENABLE_EXCEPTIONS` is disabled
* `BENCHMARK_ENABLE_INSTALL` is disabled
* `BENCHMARK_ENABLE_GTEST_TESTS` is disabled
* `BENCHMARK_DOWNLOAD_DEPENDENCIES` is disabled

Original discussion can be found here:
http://lists.llvm.org/pipermail/llvm-dev/2018-August/125023.html

Reviewed by: dberris, lebedev.ri

Subscribers: ilya-biryukov, ioeric, EricWF, lebedev.ri, srhines,
dschuff, mgorny, krytarowski, fedor.sergeev, mgrang, jfb, llvm-commits

Differential Revision: https://reviews.llvm.org/D50894

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340809 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-28 09:42:41 +00:00
Andres Freund
c4c8d7b165 Add PerfJITEventListener for perf profiling support.
This new JIT event listener supports generating profiling data for
the linux 'perf' profiling tool, allowing it to generate function and
instruction level profiles.

Currently this functionality is not enabled by default, but must be
enabled with LLVM_USE_PERF=yes.  Given that the listener has no
dependencies, it might be sensible to enable by default once the
initial issues have been shaken out.

I followed existing precedent in registering the listener by default
in lli. Should there be a decision to enable this by default on linux,
that should probably be changed.

Please note that until https://reviews.llvm.org/D47343 is resolved,
using this functionality with mcjit rather than orcjit will not
reliably work.

Disregarding the previous comment, here's an example:

$ cat /tmp/expensive_loop.c

bool stupid_isprime(uint64_t num)
{
        if (num == 2)
                return true;
        if (num < 1 || num % 2 == 0)
                return false;
        for(uint64_t i = 3; i < num / 2; i+= 2) {
                if (num % i == 0)
                        return false;
        }
        return true;
}

int main(int argc, char **argv)
{
        int numprimes = 0;

        for (uint64_t num = argc; num < 100000; num++)
        {
                if (stupid_isprime(num))
                        numprimes++;
        }

        return numprimes;
}

$ clang -ggdb -S -c -emit-llvm /tmp/expensive_loop.c -o
/tmp/expensive_loop.ll

$ perf record -o perf.data -g -k 1 ./bin/lli -jit-kind=mcjit /tmp/expensive_loop.ll 1

$ perf inject --jit -i perf.data -o perf.jit.data

$ perf report -i perf.jit.data
-   92.59%  lli      jitted-5881-2.so                   [.] stupid_isprime
     stupid_isprime
     main
     llvm::MCJIT::runFunction
     llvm::ExecutionEngine::runFunctionAsMain
     main
     __libc_start_main
     0x4bf6258d4c544155
+    0.85%  lli      ld-2.27.so                         [.] do_lookup_x

And line-level annotations also work:
       │              for(uint64_t i = 3; i < num / 2; i+= 2) {
       │1 30:   movq   $0x3,-0x18(%rbp)
  0.03 │1 38:   mov    -0x18(%rbp),%rax
  0.03 │        mov    -0x10(%rbp),%rcx
       │        shr    $0x1,%rcx
  3.63 │     ┌──cmp    %rcx,%rax
       │     ├──jae    6f
       │     │                if (num % i == 0)
  0.03 │     │  mov    -0x10(%rbp),%rax
       │     │  xor    %edx,%edx
 89.00 │     │  divq   -0x18(%rbp)
       │     │  cmp    $0x0,%rdx
  0.22 │     │↓ jne    5f
       │     │                        return false;
       │     │  movb   $0x0,-0x1(%rbp)
       │     │↓ jmp    73
       │     │        }
  3.22 │1 5f:│↓ jmp    61
       │     │        for(uint64_t i = 3; i < num / 2; i+= 2) {

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D44892

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337789 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-24 00:54:06 +00:00
Nico Weber
70f3bbf514 Remove LLVM_INSTALL_CCTOOLS_SYMLINKS
It used to symlink dsymutil to llvm-dsymutil, but after r327790 llvm's dsymutil
binary is now called dsymutil without prefix.

r327792 then reversed the direction of the symlink if
LLVM_INSTALL_CCTOOLS_SYMLINKS was set, but that looks like a buildfix and not
like something anyone should need.

https://reviews.llvm.org/D45966


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330727 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 15:41:02 +00:00
Clement Courbet
a59739cda1 [llvm-exegesis] Add a flag to disable libpfm even if present.
Summary: Fixes PR37053.

Reviewers: uabelho, gchatelet

Subscribers: mgorny, tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D45436

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329781 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-11 07:32:43 +00:00
Jonas Devlieghere
a8b19e082c [dsymutil] Rename llvm-dsymutil -> dsymutil
Now that almost all functionality of Apple's dsymutil has been
upstreamed, the open source variant can be used as a drop in
replacement. Hence we feel it's no longer necessary to have the llvm
prefix.

Differential revision: https://reviews.llvm.org/D44527

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327790 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-18 11:38:41 +00:00
Saleem Abdulrasool
9b62265471 build: add the ability to create a symlink for dsymutil
Add a `LLVM_INSTALL_CCTOOLS_SYMLINKS` to mirror
`LLVM_INSTALL_BINUTILS_SYMLINKS`.  For now, this allows us to create
symlinks for `dsymutil` to `llvm-dsymutil`.  This option is off by
default, but the user can enable it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326381 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-28 23:00:50 +00:00
Paul Robinson
e2f036e8e9 Fix up and document controlling ccache via CMake options.
Patch by Matthew Davis!

Differential Revision: https://reviews.llvm.org/D41757

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323357 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-24 18:15:08 +00:00
Shoaib Meenai
fbb50d9079 [tools] Add option to install binutils symlinks
The LLVM tools can be used as a replacement for binutils, in which case
it's convenient to create symlinks with the binutils names. Add support
for these symlinks in the build system. As with any other llvm tool
symlinks, the user can limit the installed symlinks by only adding the
desired ones to `LLVM_TOOLCHAIN_TOOLS`.

Differential Revision: https://reviews.llvm.org/D39530

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317272 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-02 21:43:32 +00:00
Vedant Kumar
337397dfc2 [docs] Make a note of LLVM_BUILD_INSTRUMENTED_COVERAGE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313768 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-20 17:16:00 +00:00
Reid Kleckner
87b9591eee [cmake] Stop putting the revision info in LLVM_VERSION_STRING
Summary:
This reduces the number of build actions after a no-op commit from
thousands to about six, which should be acceptable. If six actions is
still too many, developers can disable the LLVM_APPEND_VC_REV cmake
option.

llvm-config.h is a widely included header that should rarely change.
Before this patch, it would change after every re-configure. Very few
users of llvm-config.h need to know the precise version, and those that
do can migrate to incorporating LLVM_REVISION as provided by
llvm/Support/VCSRevision.h.

This should bring LLVM back to the behavior that it had before r306858
from June 30 2017. Most LLVM tools will now print a version string like
"6.0.0svn" instead of "6.0.0-git-c40c2a23de4".

Fixes PR34308

Reviewers: pcc, rafael, hans

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D37272

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312043 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29 21:44:21 +00:00
Mandeep Singh Grang
bd92bdd24f [Docs] Updating CMake docs to include LLVM_REVERSE_ITERATION
Reviewers: beanz, mehdi_amini

Reviewed By: beanz

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D35080

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-10 17:37:36 +00:00
Rafael Espindola
78fbc18aed Completely disable git/svn version checking if not needed.
Working with git on a branch I find it really annoying that committing
a change causes ninja to think that stuff needs to be rebuilt.

With this change at least nothing in llvm needs to be rebuild when
something is committed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306858 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-30 18:48:33 +00:00
Duncan P. N. Exon Smith
40549e6094 Docs: Fix pluralization in CMake docs
Fixed "most platform" to read "most platforms", and changed "are not
using the same" to "use different" as a drive-by.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303487 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-20 05:25:19 +00:00
Sean Silva
80b90fe5c1 [docs] Point to upstream Sphinx install instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292752 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-22 03:47:49 +00:00
Mehdi Amini
a9134d2526 Add a LLVM_USE_LINKER that defines the linker to use when building LLVM
Summary:
This string parameter is passed to -fuse-ld when linking. It can be
an absolute path to your custom linker, otherwise clang will look for
`ld.{name}`.

Reviewers: davide, tejohnson, pcc

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D28738

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292047 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 03:21:30 +00:00
Michal Gorny
a50b783ab7 [cmake] Add LLVM_ENABLE_DIA_SDK option, and expose it in LLVMConfig
Add an explicit LLVM_ENABLE_DIA_SDK option to control building support
for DIA SDK-based debugging. Control its value to match whether DIA SDK
support was found and expose it in LLVMConfig (alike LLVM_ENABLE_ZLIB).

Its value is needed for LLDB to determine whether to run tests requiring
DIA support. Currently it is obtained from llvm/Config/config.h;
however, this file is not available for standalone builds. Following
this change, LLDB will be modified to use the value from LLVMConfig.

Differential Revision: https://reviews.llvm.org/D26255

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290818 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-02 18:19:35 +00:00
Mehdi Amini
390d667cee [doc] Add mention of the difference in optimization level between Release and RelWithDebInfo in Cmake.rst
This is surprising to many people.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290556 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-26 23:42:12 +00:00
Mehdi Amini
ffe516c55a Add experimental support for unofficial monorepo-like directory layout
Summary:
This allows to have clang and llvm and the other subprojects
side-by-side instead of nested. This can be used with the monorepo or
multiple repos.

It will help having a single set of sources checked out but allows to
have a build directory with llvm and another one with llvm+clang.
Basically it abstracts LLVM_EXTERNAL_xxxx_SOURCE_DIR making it more
convenient by adopting a convention.

Reviewers: bogner, beanz, jlebar

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D26365

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286162 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-07 22:13:38 +00:00
Michal Gorny
5b0f4e96ec [cmake] Support overriding remaining HTML doc install directories
Support overriding the Doxygen & OCamldoc install directories,
and provide a more FHS-compliant defaults for both of them. This extends
r282240 that added this override for Sphinx-built documentation.

LLVM_INSTALL_DOXYGEN_HTML_DIR and LLVM_INSTALL_OCAMLDOC_HTML_DIR are
added, to control the location where Doxygen-generated and
OCamldoc-generated HTML docs are installed appropriately. They both
specify CMake-style install paths, and therefore can either by relative
to the install prefix or absolute.

The new defaults are subdirectories of share/doc/llvm, and replace
the previous directories of 'docs/html' and 'docs/ocaml/html' that
resulted in creating invalid '/usr/docs' that furthermore lacked proper
namespacing for the LLVM package. The new defaults are consistent with
the ones used for Sphinx HTML documentation, differing only in the last
component. Since the 'html' subdirectory is already used for Sphinx
docs, the 'doxygen-html' and 'ocaml-html' directories are used instead.

Differential Revision: https://reviews.llvm.org/D24935

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282536 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 19:52:29 +00:00
Michal Gorny
91fdd2b663 cmake: Support overriding Sphinx HTML doc install directory
Provide ${PROJECT}_INSTALL_SPHINX_HTML_DIR variables (e.g.
LLVM_INSTALL_SPHINX_HTML_DIR) to override Sphinx HTML doc install
directory.

Bug: https://llvm.org/bugs/show_bug.cgi?id=23780

Differential Revision: https://reviews.llvm.org/D23757

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-23 11:09:33 +00:00
Chris Bieneman
51d3515b04 [CMake] Revive LLVM_*_DIRS variables
This is a partial revert of r280013. Brad King pointed out these variable names are matching CMake conventions, so we should preserve them.

I've also added a direct mapping of the LLVM_*_DIR variables which we need to make projects support building in and out of tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-01 16:43:39 +00:00
Chris Bieneman
684477bf40 [CMake] Make LLVMConfig.cmake variable names match in-tree names
With the runtimes build we're trying to use LLVMConfig.cmake as a way of providing LLVM_* variables that are needed to behave as if the project is building in tree. To make this work we need to rename two variables by dropping the "S" from the end. This makes the variables match the in-tree names.

This renames:
LLVM_INCLUDE_DIRS -> LLVM_INCLUDE_DIR
LLVM_LIBRARY_DIRS -> LLVM_LIBRARY_DIR

The versions ending in S are not used in-tree anywhere. This also cleans up LLVM_LIBRARY_DIR being set to the same value with and without the "S".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280013 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-29 21:26:32 +00:00
Renato Golin
e90638d417 [docs] Bump minimum version of CMake in its own doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273570 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23 15:28:00 +00:00
Tamas Berghammer
e1b60c4f60 Try to fix docs build after rL271440
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 00:26:18 +00:00
Tamas Berghammer
d9d9726dd8 Add new LLVM_EXTERNAL_PROJECTS option to cmake
The new option makes it possible to build external projects as part of
the llvm build without copying (or symlinking) then into llvm/tool with
specifying a few additional cmake variables.

Example usage (2 additional project called foo and bar):
-DLLVM_EXTERNAL_PROJECTS="Foo;Bar"
-DLLVM_EXTERNAL_FOO_SOURCE_DIR=/src/foo
-DLLVM_EXTERNAL_BAR_SOURCE_DIR=/src/bar

Note: This is the extension of the approach we already support for
clang/lldb/poly with adding an option to specify additional supported
projects.

Differential revision: http://reviews.llvm.org/D20838

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 23:00:45 +00:00
Chris Bieneman
37735dbc09 [CMake] Update to requiring CMake 3.4.3
Summary:
This is as per the discussions on developer lists:

http://lists.llvm.org/pipermail/llvm-dev/2016-April/098780.html
http://lists.llvm.org/pipermail/llvm-dev/2016-May/100058.html

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 20:21:32 +00:00
Simon Pilgrim
84b8ada543 Document the LLVM_ENABLE_EXPENSIVE_CHECKS cmake option introduced in r268050
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268197 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-01 15:27:47 +00:00
Chris Bieneman
f8bfee254f [Docs] Refer to the CMakePrimer from CMake doc
The "Building LLVM with CMake" document should have a reference to the CMakePrimer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 21:23:24 +00:00
Chris Bieneman
c28ee9ced7 [Docs] Updating CMake docs to include LLVM_OPTIMIZED_TABLEGEN
This is based on feedback on llvm-commits from Sean Silvas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 18:46:43 +00:00
Chris Bieneman
eceee13676 Updates based on post-commit review of r263834
* Renamed to be camel case, consistent with other docs.
* Fixed non-ascii characters (this is what I get for writing docs on an iPad).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 21:57:51 +00:00
Chris Bieneman
3600511689 [Docs] New documentation for advanced build configurations
This document covers how to use some of the new complex build configurations CMake supports.

Feedback and improvements welcomed!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263834 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 21:16:26 +00:00