-
Notifications
You must be signed in to change notification settings - Fork 988
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
Adding support for ar
and ld
variables on cmake-toolchain
#16541
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any risk of breaking by defining these CMake variables that were not defined before? Like someone defining compiler_executables
for ar/ld, that were only used in autotools?
@@ -865,7 +871,9 @@ def context(self): | |||
# To set CMAKE_<LANG>_COMPILER | |||
if comp in compilers_by_conf: | |||
compilers[lang] = compilers_by_conf[comp] | |||
return {"compilers": compilers} | |||
return {"compilers": compilers, | |||
"cmake_ar": compilers_by_conf["ar"] if "ar" in compilers_by_conf else None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it enough compilers_by_conf.get("ar")
?
@@ -289,12 +289,12 @@ def __init__(self, conanfile, backend=None, native=False): | |||
# PR related: https://github.com/mesonbuild/meson/pull/6457 | |||
#: Defines the Meson ``c_ld`` variable. Defaulted to ``CC_LD`` | |||
#: environment value | |||
self.c_ld = build_env.get("CC_LD") | |||
self.c_ld = compilers_by_conf.get("ld") or self._sanitize_env_format(build_env.get("CC_LD")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to update the PR title and changelog if this affects Meson too
I guess that we can close this one in favor of #16647? |
Changelog: Fix: Fix ar and ld flags for cmake toolchain
Docs: https://github.com/conan-io/docs/pull/XXXX
Close: #16517
CMAKE__LINK_EXECUTABLE
CMAKE_AR