Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion mypyc/build_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
ccompiler.CCompiler.__spawn = ccompiler.CCompiler.spawn # type: ignore[attr-defined]
X86_64 = platform.machine() in ("x86_64", "AMD64", "amd64")
PYODIDE = "PYODIDE" in os.environ
NO_EXTRA_FLAGS = "MYPYC_NO_EXTRA_FLAGS" in os.environ


def spawn(self, cmd, **kwargs) -> None: # type: ignore[no-untyped-def]
Expand All @@ -46,7 +47,7 @@ def spawn(self, cmd, **kwargs) -> None: # type: ignore[no-untyped-def]
continue
if "base64/arch/" in str(argument):
new_cmd.extend(["-msimd128"])
else:
elif not NO_EXTRA_FLAGS:
compiler_type: str = self.compiler_type
extra_options = EXTRA_FLAGS_PER_COMPILER_TYPE_PER_PATH_COMPONENT.get(compiler_type, None)
new_cmd = list(cmd)
Expand Down
3 changes: 2 additions & 1 deletion mypyc/lib-rt/build_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
ccompiler.CCompiler.__spawn = ccompiler.CCompiler.spawn # type: ignore[attr-defined]
X86_64 = platform.machine() in ("x86_64", "AMD64", "amd64")
PYODIDE = "PYODIDE" in os.environ
NO_EXTRA_FLAGS = "MYPYC_NO_EXTRA_FLAGS" in os.environ


def spawn(self, cmd, **kwargs) -> None: # type: ignore[no-untyped-def]
Expand All @@ -46,7 +47,7 @@ def spawn(self, cmd, **kwargs) -> None: # type: ignore[no-untyped-def]
continue
if "base64/arch/" in str(argument):
new_cmd.extend(["-msimd128"])
else:
elif not NO_EXTRA_FLAGS:
compiler_type: str = self.compiler_type
extra_options = EXTRA_FLAGS_PER_COMPILER_TYPE_PER_PATH_COMPONENT.get(compiler_type, None)
new_cmd = list(cmd)
Expand Down