Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutotoolsToolchain] Added self.xxxx_options #12645

Conversation

franramirez688
Copy link
Contributor

@franramirez688 franramirez688 commented Dec 1, 2022

Changelog: Feature: Added new attributes (Python dict) to AutotoolsToolchain: self.configure_options, self.autoreconf_options, and self.make_options.
Changelog: Feature: Added new attribute AutotoolsToolchain.use_new_options (boolean) to keep backward compatibility.
Changelog: Feature: AutotoolsToolchain.xxxxx_args are adequately initialized.
Changelog: Bugfix: AutotoolsToolchain.configure_args was overwriting Conan's pre-calculated arguments.
Docs: https://github.com/conan-io/docs/pull/XXXX
Closes: #12431
Closes: #12642
Closes: #12705
Closes: #12546

Summary:

  • Deprecating AutotoolsToolchain.xxxx_args attributes (lists) in favor of AutotoolsToolchain.xxxxx_options ones (dicts).
  • Keeping backward compatibility thanks to AutotoolsToolchain.use_new_options (bool) attr. Notice that it should disappear in the future when xxxx_args won't be used.

@SpaceIm
Copy link
Contributor

SpaceIm commented Dec 14, 2022

I think it breaks existing conan-center recipes which have to replace --host & --build by another value. Having to call something like configure_args.remove("--build=x86_64-linux-gnu") to remove --build option is too tedious and error prone, and it means that consumers have to know how autotools toolchain populates these options.

@SpaceIm
Copy link
Contributor

SpaceIm commented Dec 14, 2022

FYI, in conan-center there are currently several recipes migrated to AutotoolsToolchain which are relying on implicit removal of --build/--host options (because there is no build/host/target argument in AutotoolsToolchain like there was in AutotoolsBuildEnvironment) when there are manually injected into tc.configure_args:

  • autoconf
  • icu
  • libcurl
  • libffi
  • libgettext
  • libiconv

It's worth noting that most of these recipes have to replace --build/--host because gnu_triplet is just wrong for Visual Studio.

@franramirez688 franramirez688 changed the title [AutotoolsToolchain] Added target calculation and configure_args initialized [AutotoolsToolchain] Added target calculation and update_xxxx_args helper functions Dec 14, 2022
@czoido czoido modified the milestones: 1.56, 1.57 Dec 20, 2022
@AbrilRBS AbrilRBS self-requested a review January 10, 2023 11:37
@franramirez688 franramirez688 force-pushed the feature/at_configure_args branch from 1f76319 to 15d517c Compare January 10, 2023 11:46
@franramirez688 franramirez688 changed the title [AutotoolsToolchain] Added target calculation and update_xxxx_args helper functions [AutotoolsToolchain] Added self.xxxx_options Jan 10, 2023
@franramirez688 franramirez688 requested a review from SSE4 January 10, 2023 11:59
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

It is not fully clear why the new approach do not replace the previous one, and there are smart conversions between the two of them.

@franramirez688
Copy link
Contributor Author

Superseded by #12884 (less risky approach).

@czoido czoido removed this from the 1.57 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment