Author: Sean Perry
Date: 2021-04-12T15:06:05-04:00
New Revision: 06c8b29d23ac2e3a44f2a2f3af85b15dc8aab3c2

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

LOG: Enable creation of large response file on z/OS

Most text processing commands (eg. grep, awk) have a maximum line length limit 
on z/OS.  The current method of using cc -E & grep fails on z/OS because of 
this limit.  I'm changing the command to create the long line in the response 
file to use python.  This avoids the possibility of any tools blocking the 
generation of the large response file.  This also eliminates the need for the 
extra file.

Reviewed By: abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D100197

Added: 
    

Modified: 
    clang/test/Driver/response-file.c

Removed: 
    clang/test/Driver/Inputs/gen-response.c


################################################################################
diff  --git a/clang/test/Driver/Inputs/gen-response.c 
b/clang/test/Driver/Inputs/gen-response.c
deleted file mode 100644
index 84ffb40dbece5..0000000000000
--- a/clang/test/Driver/Inputs/gen-response.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#define M -DTEST
-#define M1 M M M M M M M M M M
-#define M2 M1 M1 M1 M1 M1 M1 M1 M1 M1 M1
-#define M3 M2 M2 M2 M2 M2 M2 M2 M2 M2 M2
-#define M4 M3 M3 M3 M3 M3 M3 M3 M3 M3 M3
-#define M5 M4 M4 M4 M4 M4 M4 M4 M4 M4 M4
-#define TEXT M5 M5 M5
-TEXT

diff  --git a/clang/test/Driver/response-file.c 
b/clang/test/Driver/response-file.c
index a7c5966c98d1d..bd374cc15907b 100644
--- a/clang/test/Driver/response-file.c
+++ b/clang/test/Driver/response-file.c
@@ -13,7 +13,7 @@
 // But there's no guarantee that we actually will (the system limit could be
 // *huge*), so just check that invoking cc1 succeeds under these conditions.
 //
-// RUN: %clang -E %S/Inputs/gen-response.c | grep DTEST > %t.1.txt
+// RUN: %python  -c 'print(*("-DTEST" for x in range(300000)))' >%t.1.txt
 // RUN: %clang -E @%t.1.txt %s -v 2>&1 | FileCheck %s -check-prefix=LONG
 // LONG: extern int it_works;
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to