[all-commits] [llvm/llvm-project] e1dcd4: [compiler-rt][builtins] Add compiler flags to catc...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Wed Aug 24 15:54:04 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1dcd4ba444b0aaac05c399670d870925cef4459
  Author: Akira Hatanaka <ahatanaka at apple.com>
  Date:   2022-08-24 (Wed, 24 Aug 2022)

  Changed paths:
    M compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
    M compiler-rt/cmake/Modules/CompilerRTUtils.cmake
    M compiler-rt/cmake/config-ix.cmake
    M compiler-rt/include/profile/InstrProfData.inc
    M compiler-rt/lib/builtins/CMakeLists.txt
    M compiler-rt/lib/builtins/eprintf.c
    M compiler-rt/lib/profile/InstrProfiling.c
    M compiler-rt/lib/profile/InstrProfilingWriter.c

  Log Message:
  [compiler-rt][builtins] Add compiler flags to catch potential errors
that can lead to security vulnerabilities

Also, fix a few places that were causing -Wshadow and
-Wformat-nonliteral warnings to be emitted.

This reapplies the patch that was reverted in 0d66dc57e8c7 because it
broke a few bots.

I made changes so that cmake checks whether some of the flags are
supported by the compiler that is used before adding them to the list.
Also, I moved function add_security_warnings to CompilerRTUtils.cmake so
that it is defined before it's used.

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

More information about the All-commits mailing list