[libc-commits] [libc] a451344 - [libc] fix LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR (#178136)

via libc-commits libc-commits at lists.llvm.org
Tue Jan 27 09:38:18 PST 2026


Author: Jakob Koschel
Date: 2026-01-27T09:38:13-08:00
New Revision: a451344abac1b3be5172539811c7a75056940498

URL: https://github.com/llvm/llvm-project/commit/a451344abac1b3be5172539811c7a75056940498
DIFF: https://github.com/llvm/llvm-project/commit/a451344abac1b3be5172539811c7a75056940498.diff

LOG: [libc] fix LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR (#178136)

In order to apply the stack protector correctly to the compile options,
we need to make sure to use the same config name everywhere.

`LIBC_CONF_ENABLE_STACK_PROTECTOR` seems to be outdated and all other
places specify `LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR` and it should
therefore be updated here as well.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCCompileOptionRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index c6c0d2bfa06bc..2f8395cca7838 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -149,13 +149,13 @@ function(_get_compile_options_from_arch output_var)
   set(config_options "")
 
   if (LIBC_TARGET_OS_IS_BAREMETAL)
-    list(APPEND config_options "-DLIBC_TARGET_OS_IS_BAREMETAL")  
+    list(APPEND config_options "-DLIBC_TARGET_OS_IS_BAREMETAL")
   endif()
   if (LIBC_TARGET_OS_IS_GPU)
-    list(APPEND config_options "-DLIBC_TARGET_OS_IS_GPU")  
+    list(APPEND config_options "-DLIBC_TARGET_OS_IS_GPU")
   endif()
   if (LIBC_TARGET_OS_IS_UEFI)
-    list(APPEND config_options "-DLIBC_TARGET_OS_IS_UEFI")  
+    list(APPEND config_options "-DLIBC_TARGET_OS_IS_UEFI")
   endif()
 
   set(${output_var} ${config_options} PARENT_SCOPE)
@@ -221,7 +221,7 @@ function(_get_common_compile_options output_var flags)
         list(APPEND compile_options "-mno-omit-leaf-frame-pointer")
       endif()
     endif()
-    if (LIBC_CONF_ENABLE_STACK_PROTECTOR)
+    if (LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR)
       list(APPEND compile_options "-fstack-protector-strong")
     endif()
     list(APPEND compile_options "-Wall")


        


More information about the libc-commits mailing list