Skip to content
  1. Jan 20, 2016
    • Quentin Colombet's avatar
      [GlobalISel] Add the proper cmake plumbing. · 105cf2b1
      Quentin Colombet authored
      This patch adds the necessary plumbing to cmake to build the sources related to
      GlobalISel.
      
      To build the sources related to GlobalISel, we need to add -DBUILD_GLOBAL_ISEL=ON.
      By default, this is OFF, thus GlobalISel sources will not impact people that do
      not explicitly opt-in.
      
      Differential Revision: http://reviews.llvm.org/D15983
      
      llvm-svn: 258344
      105cf2b1
  2. Jan 13, 2016
  3. Jan 09, 2016
  4. Jan 08, 2016
    • Dan Liew's avatar
      Teach the CMake build system to run lit's test suite. These can be run · 9d49638f
      Dan Liew authored
      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.
      
      llvm-svn: 257221
      9d49638f
  5. Dec 16, 2015
  6. Dec 03, 2015
  7. Nov 11, 2015
    • Chris Bieneman's avatar
      [CMake] Add support for building the llvm test-suite as part of an LLVM build using clang and lld · 788c95c3
      Chris Bieneman authored
      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
      
      llvm-svn: 252747
      788c95c3
  8. Nov 04, 2015
  9. Oct 27, 2015
    • Chris Bieneman's avatar
      [CMake] Get rid of LLVM_DYLIB_EXPORT_ALL, and make it the default, add... · 9c5e41f3
      Chris Bieneman authored
      [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
      
      llvm-svn: 251411
      9c5e41f3
  10. Oct 20, 2015
  11. Oct 14, 2015
    • Chris Bieneman's avatar
      [CMake] Make LLVM_VERSION_* variables user definable · f9e0b253
      Chris Bieneman authored
      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.
      
      llvm-svn: 250333
      f9e0b253
    • Chris Bieneman's avatar
      [CMake] Fixing the bots I broke. · 68ddd150
      Chris Bieneman authored
      I meant to put the POLICY setting below the version defaults.
      
      llvm-svn: 250276
      68ddd150
    • Chris Bieneman's avatar
      [CMake] Set Policy CMP0048 to NEW · 6fcc62fa
      Chris Bieneman authored
      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.
      
      llvm-svn: 250275
      6fcc62fa
  12. Oct 13, 2015
  13. Oct 12, 2015
  14. Sep 11, 2015
  15. Sep 10, 2015
  16. Sep 09, 2015
    • Joseph Tremoulet's avatar
      [CMake] Flag recursive cmake invocations for cross-compile · e5e75afe
      Joseph Tremoulet authored
      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
      
      llvm-svn: 247151
      e5e75afe
  17. Sep 05, 2015
    • Andrew Wilkins's avatar
      [cmake] rework LLVM_LINK_LLVM_DYLIB option handling · bb6d95fc
      Andrew Wilkins authored
      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
      
      llvm-svn: 246918
      bb6d95fc
  18. Sep 01, 2015
    • Andrew Wilkins's avatar
      Enable linking tools, shared libraries against libLLVM · 9211396d
      Andrew Wilkins authored
      Summary:
      Three closely related changes, to have a mode in which we link all
      executables and shared libraries against libLLVM. 
      
      1. Add a new LLVM_LINK_LLVM_DYLIB cmake option, which, when ON, will link
         executables and shared libraries against libLLVM. For this to work, it
         is necessary to also set LLVM_BUILD_LLVM_DYLIB and LLVM_DYLIB_EXPORT_ALL.
      
         It is not strictly necessary to set LLVM_DISABLE_LLVM_DYLIB_ATEXIT, but
         we also default to OFF in this mode, or tools tend to misbehave (e.g.
         stdout may not flush on exit when output is buffered.)
      
         llvm-config and Tablegen do not use libLLVM, as they are dependencies of
         libLLVM.
      
      2. Modify llvm-go to take a new flag, "linkmode=component-libs|dylib".
         Depending on which one is passed (default is component-libs), we link
         with the individual libraries or libLLVM respectively. We pass in dylib
         when LLVM_LINK_LLVM_DYLIB is ON.
      
      3. Fix LLVM_DYLIB_EXPORT_ALL on Linux, and expand the symbols exported to
         actually export all. Don't strip leading underscore from symbols on Linux,
         and make sure we get all exported symbols and weak-with-default symbols
         ("W" in nm output). Without these changes, passes won't load because
         the "Annotate..." symbols defined in lib/Support/Valigrind.cpp are not
         found.
      
      Testing:
       - Ran default build ("ninja") with LLVM, clang, compiler-rt, llgo, lldb.
       - Ran "check", "check-clang", "check-tsan", "check-libgo" targets. I've
         never had much success with LLDB tests, and llgoi is currently broken
         so check-llgo fails for an unrelated reason.
       - Ran "lldb" to ensure it loads.
      
      Reviewers: chandlerc, beanz, pcc, rnk
      
      Subscribers: rnk, chapuni, sylvestre.ledru, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D12488
      
      llvm-svn: 246527
      9211396d
  19. Aug 11, 2015
  20. Aug 10, 2015
  21. Aug 08, 2015
    • Justin Bogner's avatar
      cmake: Error on invalid CMAKE_BUILD_TYPE · 55f097fa
      Justin Bogner authored
      Apparently if you make a typo in the argument to CMAKE_BUILD_TYPE,
      cmake silently accepts this but doesn't apply any particular build
      type to your build. This means you get a build that doesn't really
      make any sense - it's sort of a debug build with asserts disabled.
      
      Error out instead.
      
      llvm-svn: 244406
      55f097fa
  22. Aug 06, 2015
  23. Jul 28, 2015
  24. Jul 15, 2015
  25. Jun 22, 2015
  26. Jun 13, 2015
  27. Jun 09, 2015
  28. Jun 05, 2015
  29. Jun 04, 2015
    • Chris Bieneman's avatar
      [CMake] Fixing the check for Ninja · 35b7f81f
      Chris Bieneman authored
      Enabling Ninja Job Pools needs to be dependent on the CMAKE_MAKE_PROGRAM not the CMAKE_GENERATOR. There are generators (like "Sublime Text 2 - Ninja") that also generate ninja build files. Basing of the CMAKE_MAKE_PROGRAM is the best future-proof way to handle this.
      
      llvm-svn: 239076
      35b7f81f
    • Evgeniy Stepanov's avatar
      Fix the check for Ninja in the CMake build. · 999b8345
      Evgeniy Stepanov authored
      The current check never passes, because CMAKE_MAKE_PROGRAM, at least on Linux,
      includes the full path to the "ninja" binary; this effectively disables
      compile/link jobs pools.
      
      Use CMAKE_GENERATOR STREQUAL "Ninja" as a more reliable check.
      
      llvm-svn: 239069
      999b8345
    • Chris Bieneman's avatar
      [CMake] Add warning for using compile and link pools on unsupported versions... · 762cbe70
      Chris Bieneman authored
      [CMake] Add warning for using compile and link pools on unsupported versions of CMake or non-ninja generators.
      
      Summary: I've gotten feedback from users on CMake 2.8 that the compile and link pool options were not working. This is expected so I'm adding a warning so we can report invalid configurations to users.
      
      Reviewers: eugenis
      
      Reviewed By: eugenis
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D10193
      
      llvm-svn: 239044
      762cbe70
    • Daniel Sanders's avatar
      Include BPF target in CMake builds. · 51867c63
      Daniel Sanders authored
      llvm-svn: 239035
      51867c63
  30. May 14, 2015
  31. Apr 13, 2015
Loading