Skip to content
Snippets Groups Projects
  1. Dec 05, 2017
    • Shoaib Meenai's avatar
      [CMake] Use PRIVATE in target_link_libraries for executables · 456e35cb
      Shoaib Meenai authored
      We currently use target_link_libraries without an explicit scope
      specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables.
      Dependencies added in this way apply to both the target and its
      dependencies, i.e. they become part of the executable's link interface
      and are transitive.
      
      Transitive dependencies generally don't make sense for executables,
      since you wouldn't normally be linking against an executable. This also
      causes issues for generating install export files when using
      LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM
      library dependencies, which are currently added as interface
      dependencies. If clang is in the distribution components but the LLVM
      libraries it depends on aren't (which is a perfectly legitimate use case
      if the LLVM libraries are being built static and there are therefore no
      run-time dependencies on them), CMake will complain about the LLVM
      libraries not being in export set when attempting to generate the
      install export file for clang. This is reasonable behavior on CMake's
      part, and the right thing is for LLVM's build system to explicitly use
      PRIVATE dependencies for executables.
      
      Unfortunately, CMake doesn't allow you to mix and match the keyword and
      non-keyword target_link_libraries signatures for a single target; i.e.,
      if a single call to target_link_libraries for a particular target uses
      one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must
      also be updated to use those keywords. This means we must do this change
      in a single shot. I also fully expect to have missed some instances; I
      tested by enabling all the projects in the monorepo (except dragonegg),
      and configuring both with and without shared libraries, on both Darwin
      and Linux, but I'm planning to rely on the buildbots for other
      configurations (since it should be pretty easy to fix those).
      
      Even after this change, we still have a lot of target_link_libraries
      calls that don't specify a scope keyword, mostly for shared libraries.
      I'm thinking about addressing those in a follow-up, but that's a
      separate change IMO.
      
      Differential Revision: https://reviews.llvm.org/D40823
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319840 91177308-0d34-0410-b5e6-96231b3b80d8
      456e35cb
  2. Oct 16, 2017
  3. Sep 23, 2017
  4. Sep 20, 2017
  5. Sep 12, 2017
    • Raphael Isemann's avatar
      Use the VFS from the CompilerInvocation by default · 7b30399e
      Raphael Isemann authored
      Summary:
      The CompilerInstance should create its default VFS from its CompilerInvocation. Right now the
      user has to manually create the VFS before creating the FileManager even though
      `-ivfsoverlay file.yaml` was passed via the CompilerInvocation (which is exactly how we worked
      around this issue in `FrontendAction.cpp` so far).
      
      This patch uses the invocation's VFS by default and also tests this behavior now from the
      point of view of a program that uses the clang API.
      
      Reviewers: benlangmuir, v.g.vassilev
      
      Reviewed By: v.g.vassilev
      
      Subscribers: mgorny, cfe-commits, v.g.vassilev
      
      Differential Revision: https://reviews.llvm.org/D37416
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313049 91177308-0d34-0410-b5e6-96231b3b80d8
      7b30399e
  6. Sep 11, 2017
    • Cameron Desrochers's avatar
      [PCH] Allow VFS to be used for tests that generate PCH files · e218fafc
      Cameron Desrochers authored
      When using a virtual file-system (VFS) and a preamble file (PCH) is generated,
      it is generated on-disk in the real file-system instead of in the VFS (which
      makes sense, since the VFS is read-only). However, when subsequently reading
      the generated PCH, the frontend passes through the VFS it has been given --
      resulting in an error and a failed parse (since the VFS doesn't contain the
      PCH; the real filesystem does).
      
      This patch fixes that by detecting when a VFS is being used for a parse that
      needs to work with a PCH file, and creating an overlay VFS that includes the
      PCH file from the real file-system.
      
      This allows tests to be written which make use of both PCH files and a VFS.
      
      Differential Revision: https://reviews.llvm.org/D37474
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312917 91177308-0d34-0410-b5e6-96231b3b80d8
      e218fafc
  7. Aug 25, 2017
  8. Jun 09, 2017
  9. Apr 26, 2017
  10. Jan 06, 2017
  11. Jan 05, 2017
  12. Nov 16, 2016
  13. Jul 18, 2016
  14. Feb 18, 2016
  15. Jan 26, 2016
  16. Jul 10, 2015
  17. Apr 11, 2015
  18. Feb 25, 2015
  19. Feb 24, 2015
  20. Feb 21, 2015
  21. Feb 20, 2015
  22. Oct 22, 2014
  23. Oct 15, 2014
  24. Sep 10, 2014
  25. Aug 27, 2014
  26. Aug 10, 2014
  27. Aug 08, 2014
  28. Aug 07, 2014
  29. Jul 18, 2014
  30. Jul 17, 2014
Loading