Skip to content

Commit

Permalink
version 4795
Browse files Browse the repository at this point in the history
  • Loading branch information
paulocoutinhox committed Dec 29, 2021
1 parent 8be22b8 commit 7ce8c8d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 23 deletions.
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
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 7ce8c8d

Please sign in to comment.