From 8be22b838787e4cc687d096846a9b653ce85dfb5 Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Wed, 29 Dec 2021 13:42:22 -0300 Subject: [PATCH 1/2] version 4795 --- docker/android/Dockerfile | 2 +- docker/wasm/Dockerfile | 2 +- modules/config.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/android/Dockerfile b/docker/android/Dockerfile index be65aa0..5569b35 100644 --- a/docker/android/Dockerfile +++ b/docker/android/Dockerfile @@ -58,7 +58,7 @@ WORKDIR /build RUN gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git RUN gclient sync WORKDIR /build/pdfium -RUN git checkout 64a3691918bca26c4d233c8c897d926a39e4a8b7 +RUN git checkout 187d077faebb81a2bbc11d777ece46830cf5cd8f RUN ln -s /usr/bin/python3 /usr/bin/python RUN ln -s /usr/bin/pip3 /usr/bin/pip diff --git a/docker/wasm/Dockerfile b/docker/wasm/Dockerfile index 6b20cd9..f0eb9a6 100644 --- a/docker/wasm/Dockerfile +++ b/docker/wasm/Dockerfile @@ -37,7 +37,7 @@ WORKDIR /build RUN gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git RUN gclient sync WORKDIR /build/pdfium -RUN git checkout 64a3691918bca26c4d233c8c897d926a39e4a8b7 +RUN git checkout 187d077faebb81a2bbc11d777ece46830cf5cd8f RUN ln -s /usr/bin/python3 /usr/bin/python RUN ln -s /usr/bin/pip3 /usr/bin/pip diff --git a/modules/config.py b/modules/config.py index a48f00f..ac64cf2 100644 --- a/modules/config.py +++ b/modules/config.py @@ -3,9 +3,9 @@ task = "" # pdfium -pdfium_git_branch = "4734" -pdfium_git_commit = "64a3691918bca26c4d233c8c897d926a39e4a8b7" -# ^ ref: https://pdfium.googlesource.com/pdfium/+/refs/heads/chromium/4734 +pdfium_git_branch = "4795" +pdfium_git_commit = "187d077faebb81a2bbc11d777ece46830cf5cd8f" +# ^ ref: https://pdfium.googlesource.com/pdfium/+/refs/heads/chromium/4795 # OBS 1: don't forget change in android docker file (docker/android/Dockerfile) # OBS 2: don't forget change in wasm docker file (docker/wasm/Dockerfile) From 7ce8c8dccc0c942cf7c9c42f044ed11fb6e0c619 Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Wed, 29 Dec 2021 16:08:27 -0300 Subject: [PATCH 2/2] version 4795 --- modules/android.py | 21 +++++++++++++++++++++ modules/ios.py | 28 ++++++++++++++++++++++++++++ modules/wasm.py | 25 ++----------------------- 3 files changed, 51 insertions(+), 23 deletions(-) diff --git a/modules/android.py b/modules/android.py index 093f745..8ed8cc6 100644 --- a/modules/android.py +++ b/modules/android.py @@ -72,6 +72,27 @@ def run_task_patch(): else: l.bullet("Skipped: build gn flags", l.PURPLE) + # compiler warning as error + source_file = os.path.join( + source_dir, + "build", + "config", + "compiler", + "compiler.gni", + ) + + line_content = "treat_warnings_as_errors = true" + line_number = f.get_file_line_number_with_content( + source_file, line_content, strip=True + ) + + if line_number: + content = " treat_warnings_as_errors = false" + f.set_file_line_content(source_file, line_number, content, new_line=True) + l.bullet("Applied: compiler warning as error", l.GREEN) + else: + l.bullet("Skipped: compiler warning as error", l.PURPLE) + l.ok() diff --git a/modules/ios.py b/modules/ios.py index b3647aa..a3ee2c8 100644 --- a/modules/ios.py +++ b/modules/ios.py @@ -312,6 +312,34 @@ def run_task_patch(): else: l.bullet("Skipped: core fxge", l.PURPLE) + # mllvm - 1 + source_file = os.path.join(source_dir, "build", "config", "compiler", "BUILD.gn") + + line_content = '"-mllvm",' + line_number = f.get_file_line_number_with_content( + source_file, line_content, strip=True + ) + + if line_number: + f.prepend_to_file_line_range(source_file, line_number, line_number + 1, "#") + l.bullet("Applied: mllvm - 1", l.GREEN) + else: + l.bullet("Skipped: mllvm - 1", l.PURPLE) + + # mllvm - 2 + source_file = os.path.join(source_dir, "build", "config", "compiler", "BUILD.gn") + + line_content = 'ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]' + line_number = f.get_file_line_number_with_content( + source_file, line_content, strip=True + ) + + if line_number: + f.prepend_to_file_line(source_file, line_number, "#") + l.bullet("Applied: mllvm - 2", l.GREEN) + else: + l.bullet("Skipped: mllvm - 2", l.PURPLE) + # clang 12 source_file = os.path.join( source_dir, diff --git a/modules/wasm.py b/modules/wasm.py index 8dd3b1f..6341f7d 100644 --- a/modules/wasm.py +++ b/modules/wasm.py @@ -187,7 +187,7 @@ def run_task_patch(): "gcc_toolchain.gni", ) - line_content = 'cc = "$prefix/clang"' + line_content = 'cc = "${prefix}/clang"' line_number = f.get_file_line_number_with_content( source_file, line_content, strip=True ) @@ -207,7 +207,7 @@ def run_task_patch(): "gcc_toolchain.gni", ) - line_content = 'cxx = "$prefix/clang++"' + line_content = 'cxx = "${prefix}/clang++"' line_number = f.get_file_line_number_with_content( source_file, line_content, strip=True ) @@ -321,27 +321,6 @@ def run_task_patch(): else: l.bullet("Skipped: skia pthread", l.PURPLE) - # compiler bitwise - # obs: this is not required for emscripten 3.0.0+ - source_file = os.path.join( - source_dir, - "build", - "config", - "compiler", - "BUILD.gn", - ) - - line_content = '"-Wno-bitwise-instead-of-logical",' - line_number = f.get_file_line_number_with_content( - source_file, line_content, strip=True - ) - - if line_number: - f.prepend_to_file_line(source_file, line_number, "#") - l.bullet("Applied: compiler bitwise", l.GREEN) - else: - l.bullet("Skipped: compiler bitwise", l.PURPLE) - # copy files required l.colored("Copying required files...", l.YELLOW)