Skip to content
  1. Jun 17, 2017
    • NAKAMURA Takumi's avatar
      [CMake] Introduce LLVM_TARGET_TRIPLE_ENV as an option to override... · fc7f3b75
      NAKAMURA Takumi authored
      [CMake] Introduce LLVM_TARGET_TRIPLE_ENV as an option to override LLVM_DEFAULT_TARGET_TRIPLE at runtime.
      
      No behavior is changed if LLVM_TARGET_TRIPLE_ENV is blank or undefined.
      
      If LLVM_TARGET_TRIPLE_ENV is "TEST_TARGET_TRIPLE" and $TEST_TARGET_TRIPLE is not blank,
      llvm::sys::getDefaultTargetTriple() returns $TEST_TARGET_TRIPLE.
      Lit resets config.target_triple and config.environment[LLVM_TARGET_TRIPLE_ENV] to change the default target.
      
      Without changing LLVM_DEFAULT_TARGET_TRIPLE nor rebuilding, lit can be run;
      
        TEST_TARGET_TRIPLE=i686-pc-win32 bin/llvm-lit -sv path/to/test/
        TEST_TARGET_TRIPLE=i686-pc-win32 ninja check-clang-tools
      
      Differential Revision: https://reviews.llvm.org/D33662
      
      llvm-svn: 305632
      fc7f3b75
  2. Jun 10, 2017
  3. Jun 09, 2017
  4. May 25, 2017
    • Aaron Ballman's avatar
      Update the documentation and CMake file for Visual Studio generators. · 472278a5
      Aaron Ballman authored
      By default, CMake uses a 32-bit toolchain, even when on a 64-bit platform targeting a 64-bit build. However, due to the size of the binaries involved, this can cause linker instabilities (such as the linker running out of memory). Guide people to the correct solution to get CMake to use the native toolchain.
      
      llvm-svn: 303912
      472278a5
  5. May 03, 2017
    • Tom Stellard's avatar
      CMake: Add LLVM_DYLIB_SYMBOL_VERSIONING option · d6f39ddc
      Tom Stellard authored
      Summary:
      When apps or other libraries link against a library with symbol
      versions, the version string is recorded in the import table, and used
      at runtime to resolve the symbol back to a library that provides that
      version (vaguely like how two-level namespaces work in Mach-O).  ld's
      --default-symver flag tags every exported symbol with a symbol version
      string equal to the library's soname.  Using --default-symver means
      multiple versions of libLLVM can coexist within the same process, at
      least to the extent that they don't try to pass data between each
      other's llvms.
      
      As an example, imagine a language like Rust using llvm for CPU codegen,
      binding to OpenGL, with Mesa as the OpenGL implementation using llvm for
      R600 codegen.  With --default-symver Rust and Mesa will resolve their
      llvm usage to the version each was linked against, which need not match.
      
      (Other ELF platforms like BSD and Solaris might have similar semantics,
      I've not checked.)
      
      This is based on an autoconf version of this patch by Adam Jackson.
      
      This new option can be used to add --default-symver to the linker flags
      for libLLVM.so.
      
      Reviewers: beanz
      
      Reviewed By: beanz
      
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D30997
      
      llvm-svn: 302026
      d6f39ddc
  6. Apr 19, 2017
    • Xin Tong's avatar
      Allow suppressing host and target info in VersionPrinter · 59cb7782
      Xin Tong authored
      Summary:
      VersionPrinter by default outputs information about the Host CPU
      and Default target. Printing this information requires linking in
      a large amount of data, such as supported target triples as C
      strings, which in turn bloats the binary size.
      
      Enable a new CMake option LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO
      which controls printing of the host and target info. This allows
      the target triple names to be dead-code stripped. This is a nice
      win for LLVM clients that wish to minimize their binary size, such
      as graphics drivers.
      
      By default this is ON, so there is no change in the default behavior.
      Clients who wish to suppress this printing can do so by setting this
      option to off via CMake.
      
      A test app on Linux that uses ParseCommandLineOptions() shows a binary
      size reduction of 23KB (from 149K to 126K) for a Release build, and 24KB
      (from 135K to 111K) in a MinSizeRel build.
      
      Reviewers: klimek, beanz, bogner, chandlerc, compnerd
      
      Reviewed By: compnerd
      
      Patch by pammon (Peter Ammon) !
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D30904
      
      llvm-svn: 300630
      59cb7782
  7. Mar 23, 2017
  8. Mar 21, 2017
    • Serge Pavlov's avatar
      Fix evaluation of LLVM_DEFINITIONS · 23be9459
      Serge Pavlov authored
      CMake variable LLVM_DEFINITIONS collects preprocessor definitions provided
      for host compiler that builds llvm components. A function
      add_llvm_definitions was introduced in AddLLVMDefinitions.cmake to keep
      track of these definitions and was intended to be a replacement for CMake
      command add_definitions. Actually in many cases add_definitions is still
      used and the content of LLVM_DEFINITIONS is not actual now. On the other
      hand the current version of CMake allows getting set of definitions in a
      more convenient way. This fix implements evaluation of the variable by
      reading corresponding cmake property.
      
      Differential Revision: https://reviews.llvm.org/D31125
      
      llvm-svn: 298336
      23be9459
  9. Mar 07, 2017
  10. Mar 06, 2017
    • Tom Stellard's avatar
      CMake: Add a build target for generating a source RPM · b208f71f
      Tom Stellard authored
      Summary:
      'make srpm' or 'ninja srpm' will tar up the current source code and then
      build a source RPM package.
      
      By default it will use the llvm.spec file to generate the source RPM,
      but you can specify your own custom spec file with the
      LLVM_SRPM_USER_BINARY_SPECFILE option.  CMake will perform variable
      substitution on your custom specfile, so you can reference CMake
      variables in it.  For example:
      
      Version:        @LLVM_RPM_SPEC_VERSION@
      
      Note that everything in the source directory will be included in the
      tarball so if you have a clang check out in tools/clang, then all
      the clang source will end up in the tarball to.  It is recommended
      to only use this build target with a clean source tree.
      
      Reviewers: beanz
      
      Reviewed By: beanz
      
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D30093
      
      llvm-svn: 297007
      b208f71f
  11. Feb 14, 2017
    • Aditya Nandakumar's avatar
      [Tablegen] Instrumenting table gen DAGGenISelDAG · bb0483bc
      Aditya Nandakumar authored
      To help assist in debugging ISEL or to prioritize GlobalISel backend
      work, this patch adds two more tables to <Target>GenISelDAGISel.inc -
      one which contains the patterns that are used during selection and the
      other containing include source location of the patterns
      Enabled through CMake varialbe LLVM_ENABLE_DAGISEL_COV
      
      llvm-svn: 295081
      bb0483bc
  12. Feb 08, 2017
  13. Feb 07, 2017
  14. Jan 28, 2017
  15. Jan 27, 2017
  16. Jan 12, 2017
  17. Dec 22, 2016
  18. Dec 06, 2016
    • Chris Bieneman's avatar
      [CMake] Fixing clang standalone build · ec758fad
      Chris Bieneman authored
      I broke this in r288770.
      
      llvm-svn: 288829
      ec758fad
    • Chris Bieneman's avatar
      [CMake] Cleanup TableGen include flags · 1b5f563a
      Chris Bieneman authored
      It is kinda crazy to have llvm/include and llvm/lib/Target in the include path for every tablegen invocation for every tablegen-like tool.
      
      This patch removes those flags from the tablgen function that is called everywhere by instead creating a variable LLVM_TABLEGEN_FLAGS which is setup in the LLVM source directories.
      
      This removes TableGen.cmake's dependency on LLVM_MAIN_SRC_DIR, and LLVM_MAIN_INCLUDE_DIR.
      
      llvm-svn: 288770
      1b5f563a
    • Mehdi Amini's avatar
      Introduces cmake option `LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING` · ebcb8a70
      Mehdi Amini authored
      Summary:
      We recently introduced a feature that enforce at link-time that the
      LLVM headers used by a clients are matching the ABI setting of the
      LLVM library linked to.
      
      However for clients that are using only headers from ADT and promise
      they won't call into LLVM, this is forcing to link libSupport. This
      new flag is intended to provide a way to configure LLVM with this
      promise for such client.
      
      Reviewers: bob.wilson, compnerd
      
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D27432
      
      llvm-svn: 288754
      ebcb8a70
  19. Dec 05, 2016
    • Kuba Mracek's avatar
      Use Darwin libtool's -no_warning_for_no_symbols if available to silence the... · fde4a454
      Kuba Mracek authored
      Use Darwin libtool's -no_warning_for_no_symbols if available to silence the "has no symbols" link warning
      
      Building compiler-rt on Darwin produces dozens of meaningless warnings about object files having no symbols during static archive creation. This is very intentional as compiler-rt uses #ifdefs to conditionally compile platform-specific code, and we even have a .cpp source file that only contains static asserts to make sure the environment is configured right. On Linux, this situation is fine and no warning is produced. This patch adds a libtool version detection and if it's new enough, we'll use the -no_warning_for_no_symbols flag that suppresses this warning. Build logs should be much cleaner now!
      
      Differential Revision: https://reviews.llvm.org/D27119
      
      llvm-svn: 288640
      fde4a454
  20. Nov 28, 2016
    • Mehdi Amini's avatar
      Add link-time detection of LLVM_ABI_BREAKING_CHECKS mismatch · 28dd54c3
      Mehdi Amini authored
      The macro LLVM_ENABLE_ABI_BREAKING_CHECKS is moved to a new header
      abi-breaking.h, from llvm-config.h. Only headers that are using the
      macro are including this new header.
      
      LLVM will define a symbol, either EnableABIBreakingChecks or
      DisableABIBreakingChecks depending on the configuration setting for
      LLVM_ABI_BREAKING_CHECKS.
      
      The abi-breaking.h header will add weak references to these symbols in
      every clients that includes this header. This should ensure that
      a mismatch triggers a link failure (or a load time failure for DSO).
      
      On MSVC, the pragma "detect_mismatch" is used instead.
      
      Differential Revision: https://reviews.llvm.org/D26876
      
      llvm-svn: 288082
      28dd54c3
    • Daniil Fukalov's avatar
      [CMAKE] fix LLVM_OPTIMIZED_TABLEGEN for Visual Studio · fb501330
      Daniil Fukalov authored
      At the moment optimized tablegen is generated by LLVM_USE_HOST_TOOLS variable that is not set for Visual Sudio since LLVM_ENABLE_ASSERTIONS depends on CMAKE_BUILD_TYPE value that is not equal to "DEBUG" in case of Visual Studio soltion generation.
      
      Modified to do not depend on LLVM_ENABLE_ASSERTIONS value in VS and Xcode cases
      
      Reviewers: beanz
      
      Subscribers: RKSimon, llvm-commits, mgorny
      
      Differential Revision: https://reviews.llvm.org/D27135
      
      llvm-svn: 288042
      fb501330
  21. Nov 18, 2016
    • Yichao Yu's avatar
      Add an option to disable libedit · 4497a28b
      Yichao Yu authored
      Summary: This should provide the function similar to `--disable-libedit` with the autotools build system, which seems to be missing from the commit (r200595) that adds this.
      
      Reviewers: pcc, beanz
      
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D26550
      
      llvm-svn: 287293
      4497a28b
  22. Nov 17, 2016
    • Pavel Labath's avatar
      [cmake] Move LLVM_BUILD_STATIC check to an earlier point · 10849a81
      Pavel Labath authored
      Summary:
      The motivation for this is to enable correct detection of dlopen() on Android.
      Android does not provide a static version of libdl, so if we add the -static flag
      after performing the check, it will succeed even though subsequent link steps
      will fail. With this change we correctly detect the absence of libdl in a
      LLVM_BUILD_STATIC build on Android.
      
      The link itself still does not succeed because the code does not check the result
      of this check properly, but I plan to fix that in a separate change.
      
      Reviewers: beanz
      
      Subscribers: danalbert, mgorny, srhines, tberghammer, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D26463
      
      llvm-svn: 287220
      10849a81
    • Chris Bieneman's avatar
      [CMake] [Darwin] Add support for debugging tablegen dependencies · 8036e0b2
      Chris Bieneman authored
      This patch adds an option to the build system LLVM_DEPENDENCY_DEBUGGING. Over time I plan to extend this to do more complex verifications, but the initial patch causes compile errors wherever there is missing a dependency on intrinsics_gen.
      
      Because intrinsics_gen is a compile-time dependency not a link-time dependency, everything that relies on the headers generated in intrinsics_gen needs an explicit dependency.
      
      llvm-svn: 287207
      8036e0b2
  23. Nov 09, 2016
  24. Nov 07, 2016
    • Mehdi Amini's avatar
      Add experimental support for unofficial monorepo-like directory layout · 1eed06a3
      Mehdi Amini authored
      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
      
      llvm-svn: 286162
      1eed06a3
    • Mehdi Amini's avatar
      Revert "Add some facilities to work with a git monorepo (experimental setup)" · a09c7e7e
      Mehdi Amini authored
      This reverts commit r286123, accidentally commited while testing itself...
      
      llvm-svn: 286124
      a09c7e7e
    • Mehdi Amini's avatar
      Add some facilities to work with a git monorepo (experimental setup) · 7b9e9f28
      Mehdi Amini authored
      Summary:
      Some changes are made to cmake, especially the addition of a new
      LLVM_ENABLE_PROJECTS option that makes the build system aware of
      the monorepo directory structure.
      
      Also a new script is added in llvm/utils/git-svn/. When present in
      the $PATH, it enables a `git llvm` command. It is providing at this
      point only the ability to push from the git monorepo: `git llvm push`.
      It is intended to evolves with more features, for instance I plan on
      features like `git llvm show r284955` to help working with sequential
      revision numbers.
      The push feature is taken from Justin Lebar's script available here:
      https://github.com/jlebar/llvm-repo-tools/
      
      Reviewers: jlebar
      
      Subscribers: mgorny, modocache, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D26334
      
      llvm-svn: 286123
      7b9e9f28
  25. Nov 02, 2016
  26. Nov 01, 2016
  27. Oct 24, 2016
    • Justin Bogner's avatar
      cmake: Rename installhdrs to install-llvm-headers and fix the dependencies · b6310994
      Justin Bogner authored
      The installhdrs target was inconsistently named and would behave
      differently depending on whether or not you ran a build first. This
      renames it to install-llvm-headers to match other target names and
      adds a dependency on intrinsics_gen so that it will always install the
      same set of things.
      
      llvm-svn: 285035
      b6310994
  28. Oct 19, 2016
    • Michal Gorny's avatar
      [cmake] Declare LLVM_CMAKE_PATH for use in subprojects · e22b7f5a
      Michal Gorny authored
      Declare the LLVM_CMAKE_PATH to the source directory location of CMake
      files, in order to make it possible to easily use them in subprojects.
      Such a variable is already declared in most of LLVM projects
      (and inconsistently mixed with direct source tree references), including
      Clang, LLDB, compiler-rt, libcxx... Declaring it inside main LLVM tree
      makes it possible to avoid having to declare fallback values or use
      conditionals in those projects.
      
      It should be noted that in some of the subprojects LLVM_CMAKE_PATH is
      used to reference generated LLVMConfig.cmake file. However, these
      references are conditional to stand-alone builds and explicitly
      including this file is unnecessary in combined builds.
      
      Differential Revision: https://reviews.llvm.org/D25724
      
      llvm-svn: 284581
      e22b7f5a
  29. Oct 07, 2016
  30. Sep 28, 2016
  31. Sep 27, 2016
    • Michal Gorny's avatar
      [cmake] Support overriding remaining HTML doc install directories · c496c502
      Michal Gorny authored
      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
      
      llvm-svn: 282536
      c496c502
    • Chris Bieneman's avatar
      Improve CMake output of host and target triple · 0775a232
      Chris Bieneman authored
      Summary:
      The previous output was confusing as it would output "Taget triple:
      x86_64-unknown-linux-gnu" even when LLVM_HOST_TRIPLE or
      LLVM_DEFAULT_TARGET_TRIPLE were set on the CMake command line
      
      Patch by: Alex Richardson!
      
      Reviewers: beanz
      
      Subscribers: Eugene.Zelenko
      
      Differential Revision: https://reviews.llvm.org/D17067
      
      llvm-svn: 282516
      0775a232
Loading