Lev Rumyantsev | 0ea3b6f | 2020-06-25 13:13:53 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2018 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
Bob Badour | 5ce1529 | 2021-02-12 16:38:11 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
Lev Rumyantsev | 0ea3b6f | 2020-06-25 13:13:53 -0700 | [diff] [blame] | 21 | cc_library_shared { |
| 22 | name: "libnative_bridge_vdso", |
| 23 | enabled: false, |
| 24 | native_bridge_supported: true, |
| 25 | target: { |
| 26 | native_bridge: { |
| 27 | enabled: true, |
| 28 | } |
| 29 | }, |
| 30 | arch: { |
| 31 | arm64: { |
| 32 | srcs: ["vdso_arm64.S"], |
| 33 | }, |
| 34 | arm: { |
| 35 | srcs: ["vdso_arm.S"], |
| 36 | }, |
| 37 | }, |
| 38 | export_include_dirs: ["include"], |
| 39 | // Make sure we do not drag any dependencies for vdso library (-Wl,--exclude-libs,ALL) |
| 40 | ldflags: [ |
| 41 | "-Wl,--exclude-libs,ALL", |
| 42 | "-Wl,-soname,linux-vdso.so.1", |
| 43 | |
| 44 | // TODO(b/146399556): Use -z,separate-code to ensure that each segment's p_offset and |
| 45 | // p_vaddr values are equal to work around problems with __libc_init_vdso in Bionic. |
| 46 | "-Wl,-z,separate-code", |
| 47 | ], |
| 48 | system_shared_libs: [], |
| 49 | // Opt out of native_coverage when opting out of system_shared_libs |
| 50 | native_coverage: false, |
| 51 | nocrt: true, |
| 52 | stl: "none", |
| 53 | // no_standard_libs: true, |
| 54 | strip: { |
| 55 | keep_symbols_and_debug_frame: true, |
| 56 | }, |
| 57 | pack_relocations: false, |
| 58 | } |