Programming Languages Research Group: Git - oota-llvm.git/atom - CMakeLists.txt history C/C++ LLVM-based compilers that forbids OOTA behaviors http://plrg.eecs.uci.edu/git/?p=oota-llvm.git Peizhao Ou static/git-favicon.png static/git-logo.png 2016-03-28T18:13:48Z gitweb Bump version to 3.8.1 2016-03-28T18:13:48Z Tom Stellard thomas.stellard@amd.com Tom Stellard thomas.stellard@amd.com 2016-03-28T18:13:48Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=dec3a22cf5b8f8e6c6d1bf898f3a14bc4c54e0b4
Bump version to 3.8.1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@264605 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
Drop 'svn' suffix from version. 2016-01-13T19:03:44Z Hans Wennborg hans@hanshq.net Hans Wennborg hans@hanshq.net 2016-01-13T19:03:44Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=9faaefea9cbef6453486ed825c1ca4305bf68324
Drop 'svn' suffix from version.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257651 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
Revert "Teach the CMake build system to run lit's test suite. These can be run" 2016-01-09T21:42:57Z Dan Liew dan@su-root.co.uk Dan Liew dan@su-root.co.uk 2016-01-09T21:42:57Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=6966456067325c4a84ee2283ce14122bae0a60d2
Revert "Teach the CMake build system to run lit's test suite. These can be run"

This reverts r257221.

This caused several build bot failures

* It looks like some of the tests don't work correctly under Windows
* It looks like the lit per test timeout tests fail

So I'm reverting for now. Once the above failures are fixed running
lit's tests can be enabled again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257268 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
Teach the CMake build system to run lit's test suite. These can be run 2016-01-08T22:36:22Z Dan Liew dan@su-root.co.uk Dan Liew dan@su-root.co.uk 2016-01-08T22:36:22Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=ad637ba2fd19f34a68d2c4e7f6fff4c79db91f5c
Teach the CMake build system to run lit's test suite. These can be run
directy with ``make check-lit`` and are run as part of
``make check-all``.

In principle we should run lit's testsuite before testing LLVM using lit
so that any problems with lit get discovered before testing LLVM so we
can bail out early.  However this implementation (``check-all`` runs all
tests together) seemed simpler and will still report failing lit tests.

Note that the tests and the configured ``lit.site.cfg`` have to be
copied into the build directory to avoid polluting the source tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257221 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
Generate a clang CompilationDatabase when running CMake 2015-12-16T18:17:45Z Benjamin Kramer benny.kra@googlemail.com Benjamin Kramer benny.kra@googlemail.com 2015-12-16T18:17:45Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=dd45002d97901e1e6affbdba876d28ea30d4aab1
Generate a clang CompilationDatabase when running CMake

This generates a compile_commands.json file, which tells tools like
YouCompleteMe and clang_complete exactly how to build each source file.

Patch by Justin Lebar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255789 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Add option LLVM_EXTERNALIZE_DEBUGINFO 2015-12-03T18:45:39Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-12-03T18:45:39Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=0123bc6beac1ca9a06450e98d8e829d32ce52498
[CMake] Add option LLVM_EXTERNALIZE_DEBUGINFO

Summary: This adds support for generating dSYM files and stripping debug info from executables and dylibs. It also supports passing -object_path_lto to the linker to generate dSYMs for LTO builds.

Reviewers: bogner, friss

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254627 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Add support for building the llvm test-suite as part of an LLVM build using... 2015-11-11T16:14:03Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-11-11T16:14:03Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=7f75644664ac8429783509553912515ff06708c7
[CMake] Add support for building the llvm test-suite as part of an LLVM build using clang and lld

Summary:
This patch adds a new CMake module for working with ExternalProjects. This wrapper for ExternalProject supports using just-built tools and can hook up dependencies properly so that projects get cleared out.

The example usage here is for the llvm test-suite. In this example, the test-suite is setup as dependent on clang and lld if they are in-tree. If the clang or lld binaries change the test-suite is re-configured, cleaned, and rebuilt.

This cleanup and abstraction wrapping ExternalProject can be extended and applied to other runtime libraries like compiler-rt and libcxx.

Reviewers: samsonov, jroelofs, rengolin, jmolloy

Subscribers: jmolloy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252747 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
Relax the check for ninja. 2015-11-04T19:18:11Z Rafael Espindola rafael.espindola@gmail.com Rafael Espindola rafael.espindola@gmail.com 2015-11-04T19:18:11Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=13ed0ecd8bf1af385d0e659d477c0f50406348ac
Relax the check for ninja.

On fedora the ninja executable is called ninja-build :-(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252062 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Get rid of LLVM_DYLIB_EXPORT_ALL, and make it the default, add libLLVM-C... 2015-10-27T16:02:04Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-10-27T16:02:04Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=cd9aae70e988dbd80af933bc144f1c8df431a0e9
[CMake] Get rid of LLVM_DYLIB_EXPORT_ALL, and make it the default, add libLLVM-C on darwin to cover the C API needs.

Summary:
We've had a lot of discussion in the past about the meaningful and useful default behaviors for the llvm-shlib tool. The original implementation was heavily geared toward Apple's use, and I think that was wrong. This patch seeks to correct that.

I've removed the LLVM_DYLIB_EXPORT_ALL variable and made libLLVM export everything by default.

I've also added a new target that is only built on Darwin for libLLVM-C as a library that re-exports the LLVM-C API. This library is not built on Linux because ELF doesn't support re-export libraries in the same way MachO does.

Reviewers: chapuni, resistor, bogner, axw

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251411 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] All the checks for if LLVM_VERSION_* variables are set need to be if(DEFINED... 2015-10-20T18:16:37Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-10-20T18:16:37Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=20263fdbfb77522f56df6521a1a09af214a1d7e0
[CMake] All the checks for if LLVM_VERSION_* variables are set need to be if(DEFINED ...)

This is because if you set one of the variables to 0, if(NOT ...) is true, which isn't what you actually want. Should have thought that through better the first time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250841 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Make LLVM_VERSION_* variables user definable 2015-10-14T21:50:09Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-10-14T21:50:09Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=df03dfef7d34a30659c10dd218a51e689fdf8c63
[CMake] Make LLVM_VERSION_* variables user definable

CMake's set command overwrites existing values. Package maintainers may want or need to set the version variables manually, so we need to only set them if they are not already defined. Note I use the "if(NOT DEFINED ...)" syntax deliberately in the last case because empty string is a valid value for the suffx, but not the other variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250333 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Fixing the bots I broke. 2015-10-14T07:40:34Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-10-14T07:40:34Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=c5b7cb83464d7540a3f38faf34b91d434999b836
[CMake] Fixing the bots I broke.

I meant to put the POLICY setting below the version defaults.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250276 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Set Policy CMP0048 to NEW 2015-10-14T07:37:00Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-10-14T07:37:00Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=4bf6258b01ea77d8d8f89a7ca7c22bbab19ca2ae
[CMake] Set Policy CMP0048 to NEW

CMake 3.0 introduced the VERSION option for the project() command. If you don't specify the VERSION in the function it will clear out variables matching ${PROJECT_NAME}_VERSION_${MAJOR|MINOR|PATCH|TWEAK}.

This makes overriding LLVM_VERSION_* not work properly with newer versions of CMake. To make this work properly we need to:

(1) Optionally set the policy to NEW
(2) Move default versions and setting PACKAGE_VERSION to before the call to project()
(3) If the policy is set, pass the VERSION and LANGUAGES options in the new format

This change should have no behavioral change for CMake versions before 3.0, and it makes the behavior of later versions match the earlier versions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250275 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] LLVM_PROFDATA_FILE only works if you're using clang, so we should error out... 2015-10-13T05:35:12Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-10-13T05:35:12Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=405342d075da81d372f454193e1c3f22ffe1e734
[CMake] LLVM_PROFDATA_FILE only works if you're using clang, so we should error out if it is specified when not using clang.

Also updated the CMake docs.

Based on post-commit review of r250108 from Sean Silvas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250150 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Adding support for passing in profiling data. 2015-10-12T21:13:20Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-10-12T21:13:20Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=ce28cbb5077c068af4f24d1e04b8ddfa54a2261c
[CMake] Adding support for passing in profiling data.

Adds LLVM_PROFDATA_FILE option to allow specifying a profile data file to be used during compilation of LLVM and subprojects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250108 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] [Darwin] Need to set lto_library on CMAKE_MODULE_LINKER_FLAGS as well 2015-09-11T18:39:19Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-09-11T18:39:19Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=d917fe01ab1f4fb4f534571572359a83e618a98f
[CMake] [Darwin] Need to set lto_library on CMAKE_MODULE_LINKER_FLAGS as well

This is a follow-on to r247308.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247443 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Add DARWIN_LTO_LIBRARY option to allow overriding -lto_library. 2015-09-10T17:28:51Z Chris Bieneman beanz@apple.com Chris Bieneman beanz@apple.com 2015-09-10T17:28:51Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=4b5f4e5618d5daf8c5394ae0c22fa00ebc428cec
[CMake] Add DARWIN_LTO_LIBRARY option to allow overriding -lto_library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247308 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
Add a way to skip the Go bindings tests even when Go is configured in 2015-09-10T05:47:43Z Chandler Carruth chandlerc@gmail.com Chandler Carruth chandlerc@gmail.com 2015-09-10T05:47:43Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=e7a8fe1967f295129b3118b1bc8a5cc210dcd528
Add a way to skip the Go bindings tests even when Go is configured in
CMake.

The Go bindings tests in an unoptimized build take over 30 seconds for
me, making it the slowest test in 'check-llvm' by a factor of two.

I've only rigged this up fully to the CMake build. If someone is
interested in rigging it up to the autoconf build, they're welcome to do
so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247243 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[CMake] Flag recursive cmake invocations for cross-compile 2015-09-09T14:57:06Z Joseph Tremoulet jotrem@microsoft.com Joseph Tremoulet jotrem@microsoft.com 2015-09-09T14:57:06Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=22c3d9db50721e183294287f2edafc1f4b2c1034
[CMake] Flag recursive cmake invocations for cross-compile

Summary:
Cross-compilation uses recursive cmake invocations to build native host
tools.  These recursive invocations only forward a fixed set of
variables/options, since the native environment is generally the default.
This change adds -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE to the recursive
cmake invocations, so that cmake files can distinguish these recursive
invocations from top-level ones, which can explain why expected options
are unset.

LLILC will use this to avoid trying to generate its build rules in the
crosscompile native host target (where it is not needed), which would fail
if attempted because LLILC requires a cmake variable passed on the command
line, which is not forwarded in the recursive invocation.

Reviewers: rnk, beanz

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247151 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt
[cmake] rework LLVM_LINK_LLVM_DYLIB option handling 2015-09-05T08:27:33Z Andrew Wilkins axwalk@gmail.com Andrew Wilkins axwalk@gmail.com 2015-09-05T08:27:33Z http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff;h=f5148ebe0ac2e89cf991b7d6e01778bbb8d55034
[cmake] rework LLVM_LINK_LLVM_DYLIB option handling

Summary:
This diff attempts to address the concerns raised in
http://reviews.llvm.org/D12488.

We introduce a new USE_SHARED option to llvm_config,
which, if set, causes the target to be linked against
libLLVM.

add_llvm_utility now uniformly disables linking against
libLLVM. These utilities are not intended for distribution,
and this keeps the option handling more centralised.

llvm-shlib is now processes before any other "tools"
subdirectories, ensuring the libLLVM target is defined
before its dependents.

One main difference from what was requested: llvm_config
does not prune LLVM_DYLIB_COMPONENTS from the components
passed into explicit_llvm_config. This is because the "all"
component does something special, adding additional
libraries (namely libLTO). Adding the component libraries
after libLLVM should not be a problem, as symbols will be
resolved in libLLVM first.

Finally, I'm not really happy with the
DISABLE_LLVM_LINK_LLVM option, but I'm not sure of a
better way to get the following:
 - link all tools and shared libraries to libLLVM if
   LLVM_LINK_LLVM_DYLIB is set
 - some way of explicitly *not* doing so for utilities
   and libLLVM itself
Suggestions for improvement here are particularly welcome.

Reviewers: beanz

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246918 91177308-0d34-0410-b5e6-96231b3b80d8
  • [D] CMakeLists.txt