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
Drop 'svn' suffix from version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@257651 91177308-0d34-0410-b5e6-96231b3b80d8
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
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
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
[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
[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
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
[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
[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
[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
[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
[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
[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
[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
[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
[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
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
[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
[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