TheGreatRambler commented on issue #4606:
I should note
BUILD_BYPRODUCTS ${WASMTIME_BUILD_PRODUCT}
was required to add support for ninja, ninja ignoresExternalProject_Add
if no external product is specified. A little additional code was required to set that variable.
github-actions[bot] commented on issue #4606:
Subscribe to Label Action
cc @peterhuene
<details>
This issue or pull request has been labeled: "wasmtime:c-api"Thus the following users have been cc'd because of the following labels:
- peterhuene: wasmtime:c-api
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton commented on issue #4606:
I only sort of barely understand cmake, but is this sort of configuration standard? I would expect all this toolchain configuration to be configured by whomever is building
wasmtime-c-api
rather than hardcoded into cmake files. I feel like this sort of configuration is also necessary for cross-compiled builds and I don't think we'd want to hardcode everything for that per se?This is all sort of on the side and fine to add but I'm not sure if you have a particular end goal for the cmake support in mind or how many other platforms might be added.
TheGreatRambler commented on issue #4606:
I suppose the reason it's so excessive here is that rust doesn't fit nicely into the CMake ecosystem so I have to manually pass it the compiler, archiver and locations of some required shared libs, especially because as noted in the comments rust incorrectly handles some shared libraries for later versions of the NDK. This process would be a lot cleaner if the calling CMake project could modify the compiler and libraries used by wasmtime but with ExternalProject you can't do that.
alexcrichton commented on issue #4606:
Could this perhaps be generalized to avoid duplication? Could
--target
always be passed perhaps? Or couldRUSTFLAGS
-the-env var be set to avoid duplicating the build command?
TheGreatRambler commented on issue #4606:
My PC won't have internet access for a couple of days but I'll see about that change. I do think this effortlessly pulls wasmtime into Android projects that don't understand rust but if it's messy I understand
TheGreatRambler commented on issue #4606:
Made a slight change to deduplicate
ExternalProject_Add
and make theCMakeLists.txt
cleaner.
TheGreatRambler commented on issue #4606:
Cool, thank you!
Last updated: Nov 22 2024 at 16:03 UTC