[libc-commits] [libc] baf35d7 - [libc] Fix bug in LIBC_CONF_ERRNO_MODE being undefined (#144896)

via libc-commits libc-commits at lists.llvm.org
Thu Jun 19 11:50:10 PDT 2025


Author: William Huynh
Date: 2025-06-19T14:50:07-04:00
New Revision: baf35d7a829efb9688dc0aef6d1e161ef6bc5983

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

LOG: [libc] Fix bug in LIBC_CONF_ERRNO_MODE being undefined (#144896)

A typo, set() instead of list() would cause the build to not define
LIBC_CONF_ERRNO_MODE, which would cause the wrong configuration to be
used.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCCompileOptionRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index a98e7276bef80..82d06e2b9eb55 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -107,7 +107,7 @@ function(_get_compile_options_from_config output_var)
   endif()
 
   if(LIBC_CONF_ERRNO_MODE)
-    set(APPEND config_options "-DLIBC_ERRNO_MODE=${LIBC_CONF_ERRNO_MODE}")
+    list(APPEND config_options "-DLIBC_ERRNO_MODE=${LIBC_CONF_ERRNO_MODE}")
   endif()
 
   set(${output_var} ${config_options} PARENT_SCOPE)


        


More information about the libc-commits mailing list