Skip to content

Commit

Permalink
Remove debug codes
Browse files Browse the repository at this point in the history
  • Loading branch information
shinaoka committed Jun 24, 2024
1 parent e45081e commit 5ab6d04
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def build_extensions(self):
new_flags = {"-Wextra": None, "-std": "c11"}
# By default, we do not optimize for the architecture by default,
# because this is harmful when building a binary package.
print("debug", self.opt_arch)
if self.opt_arch:
new_flags["-mtune"] = new_flags["-march"] = "native"

Expand All @@ -144,14 +143,13 @@ def build_extensions(self):
if "-arch" in flags_dict:
flags_dict["-march"] = flags_dict.pop("-arch")

# Remove any existing -mtune, -march, -arch flags if not self.opt_arch
if not self.opt_arch:
for key in ["-mtune", "-march", "-arch"]:
if key in flags_dict:
del flags_dict[key]

print(flags_dict)
flags_dict.update(new_flags)
print(new_flags)
self.compiler.compiler_so = make_exec_string(cc_so, flags_dict)

# clang on 14.4.1 fails to include C header files...
Expand Down

0 comments on commit 5ab6d04

Please sign in to comment.