Add support for weak symbols in the NDK stubs.
Test: nose2
Bug: None
Change-Id: I202f718103f4a645b1eb83c0a9f5313bcdb4d485
diff --git a/cc/test_gen_stub_libs.py b/cc/test_gen_stub_libs.py
index 4df6cf8..b20a5c7 100755
--- a/cc/test_gen_stub_libs.py
+++ b/cc/test_gen_stub_libs.py
@@ -430,6 +430,8 @@
gsl.Version('VERSION_1', None, [], [
gsl.Symbol('foo', []),
gsl.Symbol('bar', ['var']),
+ gsl.Symbol('woodly', ['weak']),
+ gsl.Symbol('doodly', ['weak', 'var']),
]),
gsl.Version('VERSION_2', 'VERSION_1', [], [
gsl.Symbol('baz', []),
@@ -443,6 +445,8 @@
expected_src = textwrap.dedent("""\
void foo() {}
int bar = 0;
+ __attribute__((weak)) void woodly() {}
+ __attribute__((weak)) int doodly = 0;
void baz() {}
void qux() {}
""")
@@ -453,6 +457,8 @@
global:
foo;
bar;
+ woodly;
+ doodly;
};
VERSION_2 {
global: