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

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 06:52:07 PDT 2019


amyk marked an inline comment as done.
amyk added inline comments.


================
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>")
----------------
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?


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