[all-commits] [llvm/llvm-project] 2d3ae6: [cmake] Enable users to specify archive creation c...

Alexander Shaposhnikov via All-commits all-commits at lists.llvm.org
Mon Jan 10 10:54:32 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d3ae6f4844bb5b61936d957e9328490f18ecd41
      https://github.com/llvm/llvm-project/commit/2d3ae6f4844bb5b61936d957e9328490f18ecd41
  Author: Alexander Shaposhnikov <ashaposhnikov at google.com>
  Date:   2022-01-10 (Mon, 10 Jan 2022)

  Changed paths:
    M llvm/cmake/modules/HandleLLVMOptions.cmake

  Log Message:
  -----------
  [cmake] Enable users to specify archive creation commands

This diff enables users to override CMAKE_C_ARCHIVE_CREATE & CMAKE_CXX_ARCHIVE_CREATE
(currently set in HandleLLVMOptions.cmake).

For example, one can specify
cmake -DCMAKE_C_ARCHIVE_CREATE="<CMAKE_AR> TDqc <TARGET> <LINK_FLAGS> <OBJECTS>" \
      -DCMAKE_CXX_ARCHIVE_CREATE="<CMAKE_AR> TDqc <TARGET> <LINK_FLAGS> <OBJECTS>" ...
to make the build create thin archives instead of regular ones.
For a clean run `ninja lld` using thin archives seems to reduce the size
of the build directory from ~14GB to ~8GB

Differential revision: https://reviews.llvm.org/D116850




More information about the All-commits mailing list