[llvm] 6690eaa - [gn] Fix a benign bug in write_cmake_config.py (#196043)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 04:06:41 PDT 2026


Author: Nico Weber
Date: 2026-05-06T11:06:36Z
New Revision: 6690eaadfb5693dde53cbeb694476f43decb100e

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

LOG: [gn] Fix a benign bug in write_cmake_config.py (#196043)

A local read() function was ignoring its parameter and was instead
always using the value that was passed in as parameter anyways.

No actual behavior change.

Added: 
    

Modified: 
    llvm/utils/gn/build/write_cmake_config.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/build/write_cmake_config.py b/llvm/utils/gn/build/write_cmake_config.py
index a14df6b2cdeab..6299372ff83ce 100755
--- a/llvm/utils/gn/build/write_cmake_config.py
+++ b/llvm/utils/gn/build/write_cmake_config.py
@@ -109,7 +109,7 @@ def repl(m):
         return 1
 
     def read(filename):
-        with open(args.output) as f:
+        with open(filename) as f:
             return f.read()
 
     if not os.path.exists(args.output) or read(args.output) != output:


        


More information about the llvm-commits mailing list