Skip to content

Commit df47130

Browse files
Make -Wl,--undefined-version google-only.
--undefined-version was added to work around tensorflow_jni linking with newer ld.lld that defaults to --no-undefined-version. ``` 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 ``` However, --undefined-version is unsupported by GNU ld<2.40. Don't add it for now. PiperOrigin-RevId: 530491785
1 parent 674d149 commit df47130

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tensorflow/java/BUILD

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,9 @@ tf_cc_binary(
439439
"-z defs",
440440
"-s",
441441
"-Wl,--version-script,$(location {})".format(LINKER_VERSION_SCRIPT),
442-
"-Wl,--undefined-version",
442+
# copybara:uncomment_begin(google-only)
443+
# "-Wl,--undefined-version",
444+
# copybara:uncomment_end
443445
],
444446
}),
445447
linkshared = 1,

0 commit comments

Comments
 (0)