Skip to content
Open
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
32 changes: 10 additions & 22 deletions pyodide_build/cli/build_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,16 @@ def build_recipes_no_deps(
help="The directory where build directories for packages are created. "
"Default: recipe_dir.",
),
cflags: str = typer.Option(
"", help="Extra compiling flags. Default: SIDE_MODULE_CFLAGS"
Copy link
Member Author

Choose a reason for hiding this comment

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

This is unrelated to this PR. But I think that, as these environment variables are not exposed to the users anymore, it is not very useful.

),
cxxflags: str = typer.Option(
"", help="Extra compiling flags. Default: SIDE_MODULE_CXXFLAGS"
),
ldflags: str = typer.Option(
"", help="Extra linking flags. Default: SIDE_MODULE_LDFLAGS"
),
cflags: str = typer.Option("", help="Extra compiling flags."),
cxxflags: str = typer.Option("", help="Extra compiling flags."),
ldflags: str = typer.Option("", help="Extra linking flags."),
target_install_dir: str = typer.Option(
"",
help="The path to the target Python installation. Default: TARGETINSTALLDIR",
help="The path to the target Python installation.",
),
host_install_dir: str = typer.Option(
"",
help="Directory for installing built host packages. Default: HOSTINSTALLDIR",
help="Directory for installing built host packages.",
),
force_rebuild: bool = typer.Option(
False,
Expand Down Expand Up @@ -188,22 +182,16 @@ def build_recipes(
no_deps: bool = typer.Option(
False, help="Removed, use `pyodide build-recipes-no-deps` instead."
),
cflags: str = typer.Option(
None, help="Extra compiling flags. Default: SIDE_MODULE_CFLAGS"
),
cxxflags: str = typer.Option(
None, help="Extra compiling flags. Default: SIDE_MODULE_CXXFLAGS"
),
ldflags: str = typer.Option(
None, help="Extra linking flags. Default: SIDE_MODULE_LDFLAGS"
),
cflags: str = typer.Option(None, help="Extra compiling flags."),
cxxflags: str = typer.Option(None, help="Extra compiling flags."),
ldflags: str = typer.Option(None, help="Extra linking flags."),
target_install_dir: str = typer.Option(
"",
help="The path to the target Python installation. Default: TARGETINSTALLDIR",
help="The path to the target Python installation.",
),
host_install_dir: str = typer.Option(
"",
help="Directory for installing built host packages. Default: HOSTINSTALLDIR",
help="Directory for installing built host packages.",
),
log_dir: str = typer.Option(None, help="Directory to place log files"),
force_rebuild: bool = typer.Option(
Expand Down
2 changes: 1 addition & 1 deletion pyodide_build/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _get_make_environment_vars(self) -> Mapping[str, str]:
DEFAULT_CONFIG_COMPUTED: dict[str, str] = {
# Compiler flags
"cflags": "$(CFLAGS_BASE) -I$(PYTHONINCLUDE)",
"cxxflags": "$(CXXFLAGS_BASE)",
"cxxflags": "$(CFLAGS_BASE)",
"ldflags": "$(LDFLAGS_BASE) -s SIDE_MODULE=1",
# Rust-specific configuration
"pyo3_cross_lib_dir": "$(CPYTHONINSTALL)/sysconfigdata", # FIXME: pyodide xbuildenv stores sysconfigdata here
Expand Down