Skip to content
Open
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
# Extra cflags for all extensions, usually just warnings we want to enable explicitly
cflags = ["-Wall", "-Wextra", "-Wpointer-arith", "-Wno-unreachable-code-fallthrough"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the logs:

 cc1: note: unrecognized command-line option ‘-Wno-unreachable-code-fallthrough’ may have been intended to silence earlier diagnostics

That seems to be a pre-existing issue, but maybe you could please check that also? Was that option removed? Is the option name different?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya . -Wno-unreachable-code-fallthrough isn't actually a valid flag combination for GCC or Clang, which is why the compiler was scratching its head and throwing that diagnostic note.

I just went ahead and swapped it out for the correct flag, -Wno-implicit-fallthrough. That should completely clean up that pre-existing noise from the logs on this run!


if not is_win32:
cflags.extend(["-Wstrict-prototypes"])

compress_source = "src/borg/compress.pyx"
crypto_ll_source = "src/borg/crypto/low_level.pyx"
crypto_legacy_ll_source = "src/borg/legacy/crypto/low_level.pyx"
Expand Down Expand Up @@ -225,7 +228,8 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version, lib_s
if cythonize and cythonizing:
# 3str is the default in Cython3 and we do not support older Cython releases.
# we only set this to avoid the related FutureWarning from Cython3.
cython_opts = dict(compiler_directives={"language_level": "3str"})
cython_opts = dict(compiler_directives={"language_level": "3str", "warn.unreachable": True})

if not is_win32:
# Compile .pyx extensions to .c in parallel; does not work on Windows
cython_opts["nthreads"] = cpu_threads
Expand Down
Loading