Skip to content

Commit

Permalink
mend
Browse files Browse the repository at this point in the history
  • Loading branch information
redradist committed Jul 1, 2021
1 parent 6848205 commit f3ef60b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion recipes/wasmtime/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sources:
"0.28.0": ""
"0.28.0": ""
24 changes: 9 additions & 15 deletions recipes/wasmtime/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ class WasmtimeConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
options = {
"shared": [True, False],
'fPIC': [True],
}
default_options = {
'shared': False,
'fPIC': True,
}
generators = "cmake", "cmake_find_package", "cmake_find_package_multi"
exports_sources = ['CMakeLists.txt', 'patches/*']
Expand All @@ -26,23 +28,15 @@ class WasmtimeConan(ConanFile):
def _source_subfolder(self):
return "source_subfolder"

@property
def _minimum_cpp_standard(self):
return 11

@property
def _minimum_compilers_version(self):
return {
"Visual Studio": "15",
"apple-clang": "9.4",
"clang": "3.3",
"gcc": "4.9.4"
}

def build(self):
try:
archive_ext = "zip" if self.settings.os == "Windows" else "tar.xz"
url = f"https://github.com/bytecodealliance/wasmtime/releases/download/v{self.version}/wasmtime-v{self.version}-{self.settings.arch}-{str(self.settings.os).lower()}-c-api.{archive_ext}"
if self.settings.arch == "aarch64" and self.settings.os == "Android":
os_name = "Linux"
else:
os_name = str(self.settings.os)

archive_ext = "zip" if os_name == "Windows" else "tar.xz"
url = f"https://github.com/bytecodealliance/wasmtime/releases/download/v{self.version}/wasmtime-v{self.version}-{self.settings.arch}-{os_name.lower()}-c-api.{archive_ext}"
tools.get(url, strip_root=True, destination=self._source_subfolder)
except:
raise Exception("Binary does not exist for these settings")
Expand Down

0 comments on commit f3ef60b

Please sign in to comment.