allow_undefined_symbols to link libelf-tls-library
* Since Android does not have __tls_get_addr yet,
-fno-emulated-tls is only a test of compiler.
Lld is correct to reject this at link time.
But if the purpose of this test is to check at run-time,
allow_undefined-symbols is the trick to get the linked library.
Bug: http://b/74361956
Test: build and compare linked file
Change-Id: Ibcdc8b50aeeaec9d7d308b66df2a6997ce3c1a4f
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
index ae5f78a..c1f1590 100644
--- a/tests/libs/Android.bp
+++ b/tests/libs/Android.bp
@@ -47,6 +47,7 @@
defaults: ["bionic_testlib_defaults"],
srcs: ["elf_tls_test_library.cpp"],
cflags: ["-fno-emulated-tls"],
+ allow_undefined_symbols: true, // __tls_get_addr is undefined.
}
// -----------------------------------------------------------------------------