[all-commits] [llvm/llvm-project] e429f2: [CMake] Enable -qfuncsect when building with IBM XL

Hubert Tong via All-commits all-commits at lists.llvm.org
Wed Jan 15 07:45:55 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e429f24ed8b16149ad668edd3fb000a3a56c8e40
      https://github.com/llvm/llvm-project/commit/e429f24ed8b16149ad668edd3fb000a3a56c8e40
  Author: Hubert Tong <hubert.reinterpretcast at gmail.com>
  Date:   2020-01-15 (Wed, 15 Jan 2020)

  Changed paths:
    M compiler-rt/CMakeLists.txt
    M llvm/cmake/modules/HandleLLVMOptions.cmake

  Log Message:
  -----------
  [CMake] Enable -qfuncsect when building with IBM XL

Summary:
The IBM XL compiler uses `-qfuncsect` for `-ffunction-sections`.

The comment about sanitizers and `-f[no-]function-sections` is corrected
also, as it is pertinent to this patch.

The sanitizer-related use of `-fno-function-sections` is associated with
powerpc64le, a target for which there is an IBM XL compiler, so that use
is updated in this patch to apply `-qnofuncsect` in case a build using
the XL compiler is viable on that platform.

This patch has been verified with the XL compiler on AIX only.

Reviewers: daltenty, stevewan

Reviewed By: daltenty

Subscribers: mgorny, steven.zhang, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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


  Commit: 63b428e3861bed666525b3af56cd50e14ab30495
      https://github.com/llvm/llvm-project/commit/63b428e3861bed666525b3af56cd50e14ab30495
  Author: Hubert Tong <hubert.reinterpretcast at gmail.com>
  Date:   2020-01-15 (Wed, 15 Jan 2020)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/Dwarf.h
    M llvm/lib/BinaryFormat/Dwarf.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    M llvm/test/tools/llvm-dwarfdump/X86/debug-line.s

  Log Message:
  -----------
  DWARFDebugLine.cpp: Format unknown line number standard opcodes

Summary:
This patch implements `formatv()` formatting for `dwarf::LineNumberOps`
and makes use of it for the `llvm-dwarfdump --debug-line` dump.

Previously, unknown line number standard opcodes would lead to undefined
behaviour. The code would attempt to format the data pointer of an empty
`StringRef` (a null pointer) using `%s`. According to the description
for `format()`, use of that interface carries the "risk of `printf`".
Passing a null pointer in place of an array to a C library function
results in undefined behaviour.

Reviewers: jhenderson, daltenty, stevewan

Reviewed By: jhenderson

Subscribers: aprantl, hiraditya, llvm-commits

Tags: #llvm

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


Compare: https://github.com/llvm/llvm-project/compare/ad7f4c11eb14...63b428e3861b


More information about the All-commits mailing list