Skip to content

Commit

Permalink
Merge pull request #61 from paulo-coutinho/version-4795
Browse files Browse the repository at this point in the history
version 4795
  • Loading branch information
Paulo Coutinho authored Dec 30, 2021
2 parents fae01ae + 7ce8c8d commit 766dbf6
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docker/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/wasm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions modules/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
6 changes: 3 additions & 3 deletions modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
28 changes: 28 additions & 0 deletions modules/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
25 changes: 2 additions & 23 deletions modules/wasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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
)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 766dbf6

Please sign in to comment.