[all-commits] [llvm/llvm-project] 20dfcf: [cmake] By default do not build compiler-rt with PGO

George Burgess IV via All-commits all-commits at lists.llvm.org
Mon Mar 9 15:52:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 20dfcf189d224e637377970318a021c81d2fbde0
      https://github.com/llvm/llvm-project/commit/20dfcf189d224e637377970318a021c81d2fbde0
  Author: George Burgess IV <george.burgess.iv at gmail.com>
  Date:   2020-03-09 (Mon, 09 Mar 2020)

  Changed paths:
    M compiler-rt/CMakeLists.txt
    M compiler-rt/cmake/Modules/AddCompilerRT.cmake
    M compiler-rt/cmake/config-ix.cmake
    M compiler-rt/lib/crt/CMakeLists.txt

  Log Message:
  -----------
  [cmake] By default do not build compiler-rt with PGO

Patch by Zhizhou Yang!

In his own words:

"""
Currently compiler-rt doesn't officially support either PGO
instrumentation or use PGO profdata to build it.

PGO related flags are passed into compiler-rt since rL372209, and
causing bugs: 45022, crbug:1018840

This patch adds several checks in compiler-rt to disable PGO related
flags and provides a flag to turn on PGO for compiler-rt if needed.
"""

Differential Revision: https://reviews.llvm.org/D75499


  Commit: cfc3e7f458f8798782c01a0dadf872c60340c23e
      https://github.com/llvm/llvm-project/commit/cfc3e7f458f8798782c01a0dadf872c60340c23e
  Author: George Burgess IV <george.burgess.iv at gmail.com>
  Date:   2020-03-09 (Mon, 09 Mar 2020)

  Changed paths:
    M compiler-rt/lib/crt/CMakeLists.txt

  Log Message:
  -----------
  [cmake] Strip quotes in compiler-rt/lib/crt; error if checks fail

Patch by Zhizhou Yang!

In his own words:

"""
Similar change to CMakeLists as r372312.

After r372209, compiler command line may include argument with quotes:

```
-fprofile-instr-use="/foo/bar.profdata"
```

And it causes a hidden failure with execute_process later: Could not
read profile "/foo/bar.profdata": No such file or directory.

In this particular case, the check for .init_array will fail silently
and creates a PGO-ed binary with bad .init_array section in compiler-rt.

Bug details can be found in PR45022
"""

Differential Revision: https://reviews.llvm.org/D75065


Compare: https://github.com/llvm/llvm-project/compare/52bbdad7d63f...cfc3e7f458f8


More information about the All-commits mailing list