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

[MesonToolchain] Review mechanism to add C* flags (now env and conf) #11641

Closed
franramirez688 opened this issue Jul 14, 2022 · 1 comment
Closed

Comments

@franramirez688
Copy link
Contributor

franramirez688 commented Jul 14, 2022

I still feel this is problematic, having 2 mechanisms to define CXX_FLAGS (env and conf). Not related to this PR, I know it is already this way for C/C++ flags, but something we want to clarify for the future.

Originally posted by @memsharded in #11632 (comment)

UPDATE

MesonToolchain is initializing some flags variables through the VirtualBuildEnv:

        # Read the VirtualBuildEnv to update the variables
        build_env = VirtualBuildEnv(self._conanfile).vars()
        # ...
        self.c_args = self._get_env_list(build_env.get("CFLAGS", []))
        self.c_link_args = self._get_env_list(build_env.get("LDFLAGS", []))
        self.cpp_args = self._get_env_list(build_env.get("CXXFLAGS", []))
        self.cpp_link_args = self._get_env_list(build_env.get("LDFLAGS", []))

But also, it's possible to add more flags through the conf. I guess we could keep only the conf or think of another solution.

@franramirez688
Copy link
Contributor Author

As it does not have a high priority and does not look critical, let's close the issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant