Skip to content
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

Build libIREERuntime #11846

Closed
wangkuiyi opened this issue Jan 16, 2023 · 6 comments
Closed

Build libIREERuntime #11846

wangkuiyi opened this issue Jan 16, 2023 · 6 comments
Labels
enhancement ➕ New feature or request

Comments

@wangkuiyi
Copy link
Contributor

Request description

Neither the host compilation step, nor the Android/iOS cross-compilation step produces a runtime library.

The CMakeLists.txt file for the Runtime doesn't seem to have much in it. The build of libIREECompiler is described in the CMakeList.txt file of the Compiler.

Should we build the Runtime library as a static or a dynamic library so that iOS apps can link to it?

What component(s) does this issue relate to?

Runtime

Additional context

No response

@benvanik
Copy link
Collaborator

You want to statically link the runtime.

@wangkuiyi
Copy link
Contributor Author

Yes, I do.

Before I add the static library to my Xcode project, I use the following command line to build it.

libtool -static -o libIREERuntime.a $ALL_ARCHIVES

where ALL_ARCHIVES comes from

du -a ../iree-build-ios/runtime | grep '/lib.*a$' | cut -f 2 | grep -v testing | grep -v testdata

It would be easier if CMake's install target built it.

@stellaraccident
Copy link
Collaborator

I've recently been working on this: https://github.com/iree-org/iree-samples/tree/main/runtime-library

Let me know if that is relevant.

@wangkuiyi
Copy link
Contributor Author

wangkuiyi commented Jan 16, 2023

Thank you @stellaraccident ! This looks exactly what I am looking for.

I got a warning and an error when I was trying to build the runtime library:

I ignored the first one and changed a little bit of the code, as described in iree-org/iree-experimental#93, then I got libireert.a. I documented the steps in iree-org/iree-experimental#94.

@GMNGeoffrey
Copy link
Contributor

Is there further work required on this issue?

@stellaraccident
Copy link
Collaborator

I think it's as good as it is going to be for now. Could be better but that's future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ➕ New feature or request
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants