[go: nahoru, domu]

Skip to content

Commit

Permalink
Link tflite_jni with -Wl,--undefined-version
Browse files Browse the repository at this point in the history
The version script has some symbols that are undefined for some configurations,
which will lead to a linker error with ld.lld's new --no-undefined-version
default.

```
ld: error: version script assignment of 'VERS_1.0' to symbol 'JNI_OnLoad' failed: symbol not defined
ld: error: version script assignment of 'VERS_1.0' to symbol 'JNI_OnUnload' failed: symbol not defined
```
PiperOrigin-RevId: 570774223
  • Loading branch information
arfaian authored and tensorflower-gardener committed Oct 4, 2023
1 parent 7f7980c commit 4ba2a6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tensorflow/lite/build_def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ def tflite_jni_binary(
clean_dep("//tensorflow:windows"): [],
"//conditions:default": [
"-Wl,--version-script,$(location {})".format(linkscript),
"-Wl,--undefined-version",
# copybara:uncomment_begin(google-only)
# "-Wl,--undefined-version",
# copybara:uncomment_end
"-Wl,-soname," + name,
],
})
Expand Down

0 comments on commit 4ba2a6c

Please sign in to comment.