Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/getting-started/build-and-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ Android, Linux, MacOS, and Windows. `runtime/engine/litert_lm_main.cc` is a
Please check the corresponding section below depending on your target deployment
device and your development platform.

Make sure [Git LFS](https://git-lfs.com) is installed, and run `git lfs pull` to
fetch the latest prebuilt binaries.

> Note: In order to run on GPU on all platforms, we need to take extra steps:
>
> 1. Install [Git LFS](https://git-lfs.com), then run `git lfs checkout` to
> fetch prebuilt binaries. These steps are required only once if not done
> before.
> 1. Add `--define=litert_link_capi_so=true`
> `--define=resolve_symbols_in_exec=false` in the build command.
> 1. `mkdir -p <test_dir>; cp <your litert_lm_main> <test_dir>; cp
Expand Down
5 changes: 5 additions & 0 deletions python/litert_lm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ cc_binary(
"//conditions:default": [
"-Wl,-Bsymbolic",
"-Wl,-rpath,'$$ORIGIN'",
# Marks the binary stack as non-executable. Required for
# compatibility with modern Linux kernels (NX/SELlinux) and to
# ensure the extension can be imported in restricted environments,
# like pip install (b/496655352).
"-Wl,-z,noexecstack",
],
}),
linkshared = True,
Expand Down
Loading