[libcxx-commits] [libcxx] 0feaf22 - [libc++] Properly handle environment variables with '=' in them

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 20 16:29:18 PDT 2020


Author: Louis Dionne
Date: 2020-03-20T19:29:01-04:00
New Revision: 0feaf22c8a7c68d758306733e6d80bcdefd91658

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

LOG: [libc++] Properly handle environment variables with '=' in them

Added: 
    

Modified: 
    libcxx/utils/run.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/run.py b/libcxx/utils/run.py
index 33d0095a17ea..3e9a4703c8c7 100644
--- a/libcxx/utils/run.py
+++ b/libcxx/utils/run.py
@@ -12,9 +12,10 @@
 program's error code.
 """
 
+import argparse
+import os
 import subprocess
 import sys
-import argparse
 
 
 def main():
@@ -39,7 +40,7 @@ def main():
             return rc
 
     # Extract environment variables into a dictionary
-    env = {k : v  for (k, v) in map(lambda s: s.split('='), args.env)}
+    env = {k : v  for (k, v) in map(lambda s: s.split('=', 1), args.env)}
 
     # Ensure the file dependencies exist
     for file in args.dependencies:


        


More information about the libcxx-commits mailing list