Skip to content

Commit d0eda17

Browse files
committed
[mypyc] librt base64: only match against C files when adding the additional compiler flags
1 parent 44e1ebc commit d0eda17

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

mypyc/build_setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ def spawn(self, cmd, **kwargs) -> None: # type: ignore[no-untyped-def]
3939
if X86_64 and extra_options is not None:
4040
# filenames are closer to the end of command line
4141
for argument in reversed(new_cmd):
42-
# Check if argument contains a filename. We must check for all
43-
# possible extensions; checking for target extension is faster.
44-
if self.obj_extension and not str(argument).endswith(self.obj_extension):
42+
# Check if the matching argument contains a source filename.
43+
if not str(argument).endswith(".c"):
4544
continue
4645

4746
for path in extra_options.keys():

mypyc/lib-rt/setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ def spawn(self, cmd, **kwargs) -> None: # type: ignore[no-untyped-def]
5151
if X86_64 and extra_options is not None:
5252
# filenames are closer to the end of command line
5353
for argument in reversed(new_cmd):
54-
# Check if argument contains a filename. We must check for all
55-
# possible extensions; checking for target extension is faster.
56-
if self.obj_extension and not str(argument).endswith(self.obj_extension):
54+
# Check if the matching argument contains a source filename.
55+
if not str(argument).endswith(".c"):
5756
continue
5857

5958
for path in extra_options.keys():

0 commit comments

Comments
 (0)