From 24e90951089ffeb9a3e8030ea6f4dc38c7349d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaulo?= Date: Thu, 15 Aug 2024 10:40:49 -0300 Subject: [PATCH 1/2] updated to chromium/6658 --- .github/workflows/wasm.yml | 2 +- docker/android/Dockerfile | 2 +- docker/wasm/Dockerfile | 6 +-- modules/config.py | 6 +-- modules/wasm.py | 97 ++++---------------------------------- 5 files changed, 17 insertions(+), 96 deletions(-) diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 1cb581a..1ce6936 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -46,7 +46,7 @@ jobs: - name: Install EMSDK uses: mymindstorm/setup-emsdk@v11 with: - version: "3.1.50" + version: "3.1.64" - name: Install Node uses: actions/setup-node@v3 diff --git a/docker/android/Dockerfile b/docker/android/Dockerfile index 57153a8..7a1c563 100644 --- a/docker/android/Dockerfile +++ b/docker/android/Dockerfile @@ -59,7 +59,7 @@ RUN mkdir /build WORKDIR /build RUN gclient config --custom-var checkout_configuration=minimal --unmanaged https://pdfium.googlesource.com/pdfium.git RUN echo "target_os = [ 'android' ]" >> .gclient -RUN gclient sync -r origin/chromium/6276 --no-history --shallow +RUN gclient sync -r origin/chromium/6658 --no-history --shallow # pdfium reset and clean directories RUN git -C /build/pdfium reset --hard diff --git a/docker/wasm/Dockerfile b/docker/wasm/Dockerfile index cad2980..3d0d69e 100644 --- a/docker/wasm/Dockerfile +++ b/docker/wasm/Dockerfile @@ -38,7 +38,7 @@ RUN mkdir /build WORKDIR /build RUN gclient config --custom-var checkout_configuration=minimal --unmanaged https://pdfium.googlesource.com/pdfium.git RUN echo "target_os = [ 'wasm' ]" >> .gclient -RUN gclient sync -r origin/chromium/6276 --no-history --shallow +RUN gclient sync -r origin/chromium/6658 --no-history --shallow # pdfium reset and clean directories RUN git -C /build/pdfium reset --hard @@ -79,8 +79,8 @@ RUN pip3 install setuptools docopt pygemstones RUN mkdir /emsdk WORKDIR /emsdk RUN git clone https://github.com/emscripten-core/emsdk.git . -RUN ./emsdk install 3.1.50 -RUN ./emsdk activate 3.1.50 +RUN ./emsdk install 3.1.64 +RUN ./emsdk activate 3.1.64 ENV PATH="${PATH}:/emsdk:/emsdk/upstream/emscripten" # cache system libraries diff --git a/modules/config.py b/modules/config.py index 19fd9ad..97be6bc 100644 --- a/modules/config.py +++ b/modules/config.py @@ -3,13 +3,13 @@ task = "" # pdfium -pdfium_git_branch = "chromium/6276" -# ^ ref: https://pdfium.googlesource.com/pdfium/+/refs/heads/chromium/6276 +pdfium_git_branch = "chromium/6658" +# ^ ref: https://pdfium.googlesource.com/pdfium/+/refs/heads/chromium/6658 # 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) # emsdk -emsdk_version = "3.1.50" +emsdk_version = "3.1.64" # OBS 1: don't forget change in wasm docker file (docker/wasm/Dockerfile) # macos diff --git a/modules/wasm.py b/modules/wasm.py index a2f3763..eb709df 100644 --- a/modules/wasm.py +++ b/modules/wasm.py @@ -72,58 +72,6 @@ def run_task_patch(): else: l.bullet("Skipped: build os", l.PURPLE) - # build overrides target - source_file = os.path.join( - source_dir, - "build", - "config", - "BUILDCONFIG.gn", - ) - - line_content = '_default_toolchain = "//build/toolchain/wasm:emscripten"' - line_number = f.get_file_line_number_with_content( - source_file, line_content, strip=True - ) - - if not line_number: - source = """} else { - assert(false, "Unsupported target_os: $target_os") -}""" - - target = """} else if (target_os == "wasm") { - _default_toolchain = "//build/toolchain/wasm:emscripten" -} else { - assert(false, "Unsupported target_os: $target_os") -}""" - - f.replace_in_file(source_file, source, target) - l.bullet("Applied: build overrides target", l.GREEN) - else: - l.bullet("Skipped: build overrides target", l.PURPLE) - - # build overrides os - source_file = os.path.join( - source_dir, - "build", - "config", - "BUILDCONFIG.gn", - ) - - line_content = 'is_wasm = current_os == "wasm"' - line_number = f.get_file_line_number_with_content( - source_file, line_content, strip=True - ) - - if not line_number: - f.replace_in_file( - source_file, - 'is_mac = current_os == "mac"', - 'is_mac = current_os == "mac"\nis_wasm = current_os == "wasm"', - ) - l.bullet("Applied: build overrides os", l.GREEN) - else: - l.bullet("Skipped: build overrides os", l.PURPLE) - # compiler source_file = os.path.join( source_dir, @@ -163,7 +111,7 @@ def run_task_patch(): "BUILD.gn", ) - line_content = '} else if (current_os != "aix" && current_os != "wasm") {' + line_content = '} else if (current_os != "aix" && current_os != "zos" && current_os != "wasm") {' line_number = f.get_file_line_number_with_content( source_file, line_content, strip=True ) @@ -171,8 +119,8 @@ def run_task_patch(): if not line_number: f.replace_in_file( source_file, - '} else if (current_os != "aix") {', - '} else if (current_os != "aix" && current_os != "wasm") {', + '} else if (current_os != "aix" && current_os != "zos") {', + '} else if (current_os != "aix" && current_os != "zos" && current_os != "wasm") {', ) l.bullet("Applied: stack protector", l.GREEN) else: @@ -207,33 +155,6 @@ def run_task_patch(): else: l.bullet("Skipped: lib extension", l.PURPLE) - # # partition allocator - # source_file = os.path.join( - # source_dir, - # "base", - # "allocator", - # "partition_allocator", - # "partition_alloc_base", - # "threading", - # "platform_thread_posix.cc", - # ) - - # line_content = ( - # "#elif BUILDFLAG(IS_POSIX) && (BUILDFLAG(IS_AIX) || defined(OS_ASMJS))" - # ) - # line_number = f.get_file_line_number_with_content( - # source_file, line_content, strip=True - # ) - - # if not line_number: - # source = "#elif BUILDFLAG(IS_POSIX) && BUILDFLAG(IS_AIX)" - # target = "#elif BUILDFLAG(IS_POSIX) && (BUILDFLAG(IS_AIX) || defined(OS_ASMJS))" - - # f.replace_in_file(source_file, source, target) - # l.bullet("Applied: partition allocator", l.GREEN) - # else: - # l.bullet("Skipped: partition allocator", l.PURPLE) - # fxcrt source_file = os.path.join( source_dir, @@ -242,14 +163,14 @@ def run_task_patch(): "BUILD.gn", ) - line_content = "if (is_posix || is_fuchsia || is_wasm) {" + line_content = "if (is_posix || is_wasm) {" line_number = f.get_file_line_number_with_content( source_file, line_content, strip=True ) if not line_number: - source = "if (is_posix || is_fuchsia) {" - target = "if (is_posix || is_fuchsia || is_wasm) {" + source = "if (is_posix) {" + target = "if (is_posix || is_wasm) {" f.replace_in_file(source_file, source, target) l.bullet("Applied: fxcrt", l.GREEN) @@ -264,14 +185,14 @@ def run_task_patch(): "BUILD.gn", ) - line_content = "if (is_linux || is_chromeos || is_fuchsia || is_wasm) {" + line_content = "if (is_linux || is_chromeos || is_wasm) {" line_number = f.get_file_line_number_with_content( source_file, line_content, strip=True ) if not line_number: - source = "if (is_linux || is_chromeos || is_fuchsia) {" - target = "if (is_linux || is_chromeos || is_fuchsia || is_wasm) {" + source = "if (is_linux || is_chromeos) {" + target = "if (is_linux || is_chromeos || is_wasm) {" f.replace_in_file(source_file, source, target) l.bullet("Applied: fxge", l.GREEN) From a88c183541fa68cd2fb6c45d0bd3a1233558f32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CPaulo?= Date: Thu, 15 Aug 2024 10:43:35 -0300 Subject: [PATCH 2/2] updated to chromium/6658 --- .github/workflows/android.yml | 2 +- .github/workflows/ios.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/wasm.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e93b354..58c8ec8 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -28,7 +28,7 @@ jobs: sudo apt-get clean - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 2682200..f1ef14a 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ff30cdd..452bd1a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 1ce6936..cc89d78 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -26,7 +26,7 @@ jobs: doxygen --version - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: "3.10"