[PATCH] D64817: [CMake] Fix LLVM build non-determinism on RHEL

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 07:21:13 PDT 2019


hubert.reinterpretcast accepted this revision.
hubert.reinterpretcast added a comment.
This revision is now accepted and ready to land.

This patch LGTM.



================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:155
+    # Version 2.23 is the first version of binutils where both ar and ranlib have the D flag
+    if("${CMAKE_MATCH_0}" VERSION_GREATER "2.22")
+      set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Dqc <TARGET> <LINK_FLAGS> <OBJECTS>")
----------------
amyk wrote:
> hubert.reinterpretcast wrote:
> > Checking for > 2.22 introduces the possibility that the check passes for patch/fix levels of 2.22 when we actually cared about 2.23.
> @hubert.reinterpretcast 
> The regex used only picks up the first two `2.22`, `2.23`, etc. It doesn't pick up any subversion, e.g. `2.23.1`
> 
> Here's some example output:
> ```
> $ ranlib --version
> GNU ranlib (GNU Binutils for Ubuntu) 2.26.1
> ```
> 
> Within cmake, `([0-9]+\\.[0-9]+)` will pick up `2.26`, so the check would be correct. Is this an acceptable change?
Yes; thanks for pointing that out. Sorry for the noise.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64817/new/

https://reviews.llvm.org/D64817





More information about the llvm-commits mailing list