@@ -47,12 +47,12 @@ def run_task_patch():
47
47
source_dir ,
48
48
"BUILD.gn" ,
49
49
)
50
- if not f .file_line_has_content (source_file , 245 , '#test("pdfium_unittests") {\n ' ):
50
+ if not f .file_line_has_content (source_file , 244 , '#test("pdfium_unittests") {\n ' ):
51
51
f .file_line_comment_range (
52
- source_file , 245 , 292
52
+ source_file , 244 , 291
53
53
) # comment all lines of "pdfium_unittests"
54
54
f .file_line_comment_range (
55
- source_file , 383 , 384
55
+ source_file , 382 , 383
56
56
) # group "pdfium_all", comment all tests
57
57
58
58
f .debug ("Applied: Build GN" )
@@ -116,8 +116,8 @@ def run_task_patch():
116
116
"compiler" ,
117
117
"BUILD.gn" ,
118
118
)
119
- if f .file_line_has_content (source_file , 1703 , ' "-Wimplicit-fallthrough",\n ' ):
120
- f .file_line_comment (source_file , 1703 )
119
+ if f .file_line_has_content (source_file , 1705 , ' "-Wimplicit-fallthrough",\n ' ):
120
+ f .file_line_comment (source_file , 1705 )
121
121
122
122
f .debug ("Applied: Compiler" )
123
123
else :
@@ -153,11 +153,11 @@ def run_task_patch():
153
153
"cpdf_type1font.cpp" ,
154
154
)
155
155
if not f .file_line_has_content (
156
- source_file , 21 , "#include <CoreGraphics/CoreGraphics.h>\n "
156
+ source_file , 22 , "#include <CoreGraphics/CoreGraphics.h>\n "
157
157
):
158
158
f .replace_line_in_file (
159
159
source_file ,
160
- 21 ,
160
+ 22 ,
161
161
"#include <CoreGraphics/CoreGraphics.h>\n " ,
162
162
)
163
163
@@ -174,9 +174,9 @@ def run_task_patch():
174
174
"rules.gni" ,
175
175
)
176
176
if not f .file_line_has_content (
177
- source_file , 951 , '# data_deps += [ "//testing/iossim" ]\n '
177
+ source_file , 954 , '# data_deps += [ "//testing/iossim" ]\n '
178
178
):
179
- f .file_line_comment (source_file , 951 )
179
+ f .file_line_comment (source_file , 954 )
180
180
181
181
f .debug ("Applied: iOS Simulator" )
182
182
else :
@@ -231,6 +231,27 @@ def run_task_patch():
231
231
else :
232
232
f .debug ("Skipped: Core FXGE" )
233
233
234
+ # clang 12
235
+ source_file = os .path .join (
236
+ source_dir ,
237
+ "build" ,
238
+ "config" ,
239
+ "compiler" ,
240
+ "BUILD.gn" ,
241
+ )
242
+ if f .file_line_has_content (
243
+ source_file , 1230 , ' cflags += [ "-ffile-compilation-dir=." ]\n '
244
+ ):
245
+ f .replace_line_in_file (
246
+ source_file ,
247
+ 1230 ,
248
+ ' cflags += ["-Xclang","-fdebug-compilation-dir","-Xclang","."]\n ' ,
249
+ )
250
+
251
+ f .debug ("Applied: Clang 12" )
252
+ else :
253
+ f .debug ("Skipped: Clang 12" )
254
+
234
255
235
256
def run_task_build ():
236
257
f .debug ("Building libraries..." )
0 commit comments