-
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
wasmtime: need to download binaries in build
#7190
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.
…kage repackages binaries Co-authored-by: Chris Mc <[email protected]>
@@ -1,13 +1,11 @@ | |||
cmake_minimum_required(VERSION 3.1) | |||
project(PackageTest C) | |||
|
|||
set(CMAKE_C_STANDARD 11) |
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 not to use set(CMAKE_C_STANDARD 11)
at top of file ?
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's an idiom we adopted at cci.
"Modern CMake" is all about using targets and avoiding global variables.
It probably does not matter for such a small example, but most of us believe it's better to use best practices as much as possible.
tools.get(**self.conan_data["sources"][self.version][self._sources_key][str(self.settings.arch)], destination=self.source_folder, strip_root=True) | ||
def package_id(self): | ||
del self.info.settings.compiler.version | ||
if self.settings.compiler == "clang": |
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.
Seems like it is dirty hack ??
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's a way to alias the packages of gcc and clang.
I couldn't remove self.info.settings.compiler
.
I argue it's a clean hack 😛
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 would say to use compatible compilers instead: https://docs.conan.io/en/latest/creating_packages/define_abi_compatibility.html#compatible-compilers
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've done it this way to avoid creating duplicate packages.
Packages with compiler=gcc and compiler=clang will be identical, because nothing is built.
If I understand compatible compiler correctly, then a package for gcc and clang will be created.
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 actually used a custom package id: see https://docs.conan.io/en/latest/creating_packages/define_abi_compatibility.html#defining-a-custom-package-id
So not a hack after all. It's documented.
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.
Compatible packages would require me to list all gcc/clang versions that are compatible which does not exist, or will be always incomplete.
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.
Compatible compilers works, but it will cause c3i to generate a package for gcc and clang, which are the same.
So I'd prefer to keep the package_id
method as it is now.
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.
Right, it will generate for both clang and gcc. Indeed using same pkg id will save cci resources.
All green in build 7 (
|
@madebr Seems like your change from source to binary broke number of configurations https://conan.io/center/wasmtime In your revision it is only 6 configurations in your revision https://conan.io/center/wasmtime?version=0.29.0&revision=b298dde16782c9f78164a16db7485e6a vs 32 in my original revision https://conan.io/center/wasmtime?version=0.29.0&revision=8f85e593d7dd82d674b3d722b790ca84 !! |
It didn't break them. I hope this explains everything? |
@madebr Yeah, you are right ... |
The package is not built/served by conan-center, but can be built locally. |
Specify library name and version: wasmtime/all
wasmtime is packaging binaries, so we need to download the binaries in the
build
method.@redradist
This is an important fix for wasmtime.
I also could remove the use of
CONAN_COMPILE_DEFINITIONS_WASMTIME
in the test package.conan-center hook activated.