-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add mold 142 as build system changed from makefiles to cmake #12881
Add mold 142 as build system changed from makefiles to cmake #12881
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
recipes/mold/1.3.1/conanfile.py
Outdated
@@ -64,6 +64,9 @@ def _patch_sources(self): | |||
files.replace_in_file(self, "source_subfolder/Makefile", "MOLD_LDFLAGS += -lmimalloc", "MOLD_LDFLAGS += -L{} -lmimalloc".format( | |||
self.deps_cpp_info["mimalloc"].lib_paths[0])) | |||
|
|||
def build_requirements(self): | |||
self.build_requires("cmake/3.24.1") |
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.
Why do we need latest CMake?
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.
To keep it longer up-to-date. Is there any reason why I shouldn't use the latest version?
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.
No, not an issue. I just wanted to know why the default (the one installed in the CI) was not enough.
If it is needed only for new version 1.4.2
, please add it only to its corresponding conanfile.py
, not to old versions.
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.
Build #2 failed because of cmake requrement
mold/1.4.2:
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.18 or higher is required. You are running version 3.15.7
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.
It seems, cmake shall got a version bump first... I hoped, I will get a new mold version fast
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.
1.3.1 continues to build with make, you don't need cmake here
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.
I have separated versions 1.3.x and 1.4.x one is using make another is using cmake
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.
Oh, I realized, you're right, it's not required for 1.3.x. Fixed now
This comment has been minimized.
This comment has been minimized.
I detected other pull requests that are modifying mold/all recipe: This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5235d75
to
b9e46d7
Compare
This comment has been minimized.
This comment has been minimized.
|
||
|
||
class MoldTestConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
# VirtualRunEnv can be avoided if "tools.env.virtualenv:auto_use" is defined | ||
# (it will be defined in Conan 2.0) | ||
generators = "VirtualBuildEnv" |
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.
@uilianries @prince-chrismc What sould it be in the end? VirtualBuildEnv or VirtualRunEnv? I am confused
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.
It stopped working, as I have applied a suggestion with this change.
Why on your oppinion, it should be Run environment and not build?
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -1,3 +1,5 @@ | |||
versions: | |||
"1.3.1": | |||
folder: all | |||
folder: 1.3.1 | |||
"1.4.2": |
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.
This got outdated since you included version 1.5. Would it make sense to rename the folder to all
? So we have an all
folder for current recipes and a legacy 1.3.1
folder. It looks like mold changes minor versions often since 1.4 is relatively new.
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.
Yes, makes sense
This comment has been minimized.
This comment has been minimized.
@AndreyMlashkin Could you please add a test_v1_package? It's important to ensure Conan 1.x compatibility. Basically you just need to rename the previous version of test_package to test_v1_package. |
All green in build 34 (
|
self.output.info('Appending PATH environment variable: {}'.format(bindir)) | ||
self.env_info.PATH.append(bindir) | ||
self.env_info.LD = mold_location | ||
self.buildenv_info.prepend_path("MOLD_ROOT", bindir) |
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.
Now I see why it's not working with VirtuanRunEnv
, there is no configuration for self.runenv_info
but it's fine, as it's a linker, there is no reason for using on runtime environment.
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.
LGTM
Johuuu, finally |
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.
LGTM
…to cmake * add version 1.4.2 * add with_mimalloc option * add validate method * add cmake as build requrements * use minmalloc from conan * use minmalloc from conan * use tbb from conan * don't use cmake as requirement for old mold * hotfix * add cmake_find_package generator * add CMakeDeps * don't use old conans import * Update recipes/mold/1.4.x/conanfile.py Co-authored-by: Chris Mc <prince.chrismc@gmail.com> * package licenses * make artifacts match settings * correct package method for mold 1.3.1 * package mold binary differently for gcc and clang * exclude windows builds * delete unneeded CMakeLists * Apply suggestions from code review Co-authored-by: Uilian Ries <uilianries@gmail.com> * import VirtualBuildEnv * add a newline * Apply suggestions from code review Co-authored-by: Uilian Ries <uilianries@gmail.com> * delete package id also for 1.3.1 version * use build_requirements instead of requirements in test * Apply suggestions from code review Co-authored-by: Uilian Ries <uilianries@gmail.com> * Update recipes/mold/1.4.x/test_package/conanfile.py Co-authored-by: Chris Mc <prince.chrismc@gmail.com> * make mold test recipe work again * add version 1.5.1 * rename folder * add test_v1_package Co-authored-by: Chris Mc <prince.chrismc@gmail.com> Co-authored-by: Uilian Ries <uilianries@gmail.com>
Specify library name and version: mold/1.4.2
This is also a good place to share with all of us why you are submitting this PR (specially if it is a new addition to ConanCenter): is it a dependency of other libraries you want to package? Are you the author of the library? Thanks!