aboutsummaryrefslogtreecommitdiffstats
path: root/Android.bp
blob: 2df1afb664fc4cd4c9cf6735b3c39cea92f6e3ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
subdirs = [
    "androidmk",
    "bpfix",
    "cmd/*",
    "fs",
    "finder",
    "jar",
    "zip",
    "third_party/zip",
    "ui/*",
]

bootstrap_go_package {
    name: "soong",
    pkgPath: "android/soong",
    deps: [
        "blueprint",
    ],
    srcs: [
        "doc.go",
    ],
}

//
// Defaults to enable various configurations of host bionic
//

cc_defaults {
    name: "linux_bionic_supported",
    host_supported: true,
    target: {
        host: {
            enabled: false,
        },
        linux_bionic: {
            enabled: true,
        },
    },
}

//
// C static libraries extracted from the gcc toolchain
//

toolchain_library {
    name: "libatomic",
    defaults: ["linux_bionic_supported"],
    vendor_available: true,
    ramdisk_available: true,
    recovery_available: true,
    native_bridge_supported: true,

    arch: {
        arm: {
            src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/lib/libatomic.a",
        },
        arm64: {
            src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/lib64/libatomic.a",
        },
        x86: {
            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib/libatomic.a",
        },
        x86_64: {
            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib64/libatomic.a",
        },
    },
}

toolchain_library {
    name: "libgcc",
    defaults: ["linux_bionic_supported"],
    vendor_available: true,
    recovery_available: true,
    native_bridge_supported: true,

    arch: {
        arm: {
            src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
        },
        arm64: {
            src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
        },
        x86: {
            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
        },
        x86_64: {
            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
        },
    },
}

toolchain_library {
    name: "libgcc_stripped",
    defaults: ["linux_bionic_supported"],
    vendor_available: true,
    ramdisk_available: true,
    recovery_available: true,
    native_bridge_supported: true,
    sdk_version: "current",

    arch: {
        arm: {
            src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
            repack_objects_to_keep: ["unwind-arm.o", "libunwind.o", "pr-support.o"],
        },
        arm64: {
            src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
            repack_objects_to_keep: ["unwind-dw2.o", "unwind-dw2-fde-dip.o"],
        },
        x86: {
            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
            repack_objects_to_keep: ["unwind-dw2.o", "unwind-dw2-fde-dip.o"],
        },
        x86_64: {
            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
            repack_objects_to_keep: ["unwind-dw2.o", "unwind-dw2-fde-dip.o"],
        },
    },
}

toolchain_library {
    name: "libwinpthread",
    host_supported: true,
    enabled: false,
    target: {
        windows: {
            enabled: true,
        },
        windows_x86: {
            src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib32/libwinpthread.a",
        },
        windows_x86_64: {
            src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib/libwinpthread.a",
        },
    },
    notice: ":mingw-libwinpthread-notice",
}

toolchain_library {
    name: "libgcov",
    defaults: ["linux_bionic_supported"],

    arch: {
        arm: {
            src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a",
        },
        arm64: {
            src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcov.a",
        },
        x86: {
            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcov.a",
        },
        x86_64: {
            src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcov.a",
        },
    },
}

kernel_headers {
    name: "device_kernel_headers",
    vendor: true,
    recovery_available: true,
}

cc_genrule {
    name: "host_bionic_linker_asm",
    host_supported: true,
    device_supported: false,
    target: {
        linux_bionic: {
            enabled: true,
        },
        linux_glibc: {
            enabled: false,
        },
        darwin: {
            enabled: false,
        },
    },
    tools: ["extract_linker"],
    cmd: "$(location) -s $(out) $(in)",
    srcs: [":linker"],
    out: ["linker.s"],
}

cc_genrule {
    name: "host_bionic_linker_flags",
    host_supported: true,
    device_supported: false,
    target: {
        linux_bionic: {
            enabled: true,
        },
        linux_glibc: {
            enabled: false,
        },
        darwin: {
            enabled: false,
        },
    },
    tools: ["extract_linker"],
    cmd: "$(location) -f $(out) $(in)",
    srcs: [":linker"],
    out: ["linker.flags"],
}