diff options
author | Dan Albert <danalbert@google.com> | 2017-07-28 11:00:22 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2017-07-28 11:00:22 -0700 |
commit | f55f0787a7922e7aa3755abc9b2c0130e982afa6 (patch) | |
tree | d7a271b4f0237717c95f5a6f4ef13d40d9843f36 /cc/test_gen_stub_libs.py | |
parent | 074a5d35bffc80ff05ae4ce593314045bbf03c2d (diff) | |
download | android_build_soong-f55f0787a7922e7aa3755abc9b2c0130e982afa6.tar.gz android_build_soong-f55f0787a7922e7aa3755abc9b2c0130e982afa6.tar.bz2 android_build_soong-f55f0787a7922e7aa3755abc9b2c0130e982afa6.zip |
Add support for weak symbols in the NDK stubs.
Test: nose2
Bug: None
Change-Id: I202f718103f4a645b1eb83c0a9f5313bcdb4d485
Diffstat (limited to 'cc/test_gen_stub_libs.py')
-rwxr-xr-x | cc/test_gen_stub_libs.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/test_gen_stub_libs.py b/cc/test_gen_stub_libs.py index 4df6cf8c..b20a5c73 100755 --- a/cc/test_gen_stub_libs.py +++ b/cc/test_gen_stub_libs.py @@ -430,6 +430,8 @@ class GeneratorTest(unittest.TestCase): 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 @@ class GeneratorTest(unittest.TestCase): 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 @@ class GeneratorTest(unittest.TestCase): global: foo; bar; + woodly; + doodly; }; VERSION_2 { global: |