[libc-commits] [PATCH] D155721: [libc] Warn on use of global constructors in `libc`

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jul 20 09:30:28 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG26a1849cca4e: [libc] Warn on use of global constructors in `libc` (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155721

Files:
  libc/cmake/modules/LLVMLibCObjectRules.cmake


Index: libc/cmake/modules/LLVMLibCObjectRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -38,6 +38,7 @@
       list(APPEND compile_options "-Wnonportable-system-include-path")
       list(APPEND compile_options "-Wstrict-prototypes")
       list(APPEND compile_options "-Wthread-safety")
+      list(APPEND compile_options "-Wglobal-constructors")
     endif()
     if(ADD_FMA_FLAG)
       if(LIBC_TARGET_ARCHITECTURE_IS_X86)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155721.542563.patch
Type: text/x-patch
Size: 558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230720/6b7dcb63/attachment.bin>


More information about the libc-commits mailing list