summaryrefslogtreecommitdiff
path: root/tools/Android.bp
blob: 85d47a96899cab99a6ddc12708bd3d91f2aa04f2 (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
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "prebuilts_sdk_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    //   SPDX-license-identifier-BSD
    //   SPDX-license-identifier-CPL-1.0
    //   SPDX-license-identifier-MIT
    //   SPDX-license-identifier-Unicode-DFS
    //   SPDX-license-identifier-W3C
    default_applicable_licenses: ["prebuilts_sdk_license"],
}

cc_prebuilt_library_shared {
    name: "libLLVM_android",
    vendor_available: true,
    host_supported: true,
    // TODO(ccross): this is necessary because the prebuilt module must have
    // all the variants that are in the source module.  Ideally Soong's
    // arch mutator should handle this.
    // TODO(b/153609531): remove when no longer needed.
    native_bridge_supported: true,
    target: {
        linux_glibc_x86_64: {
            srcs: ["linux/lib64/libLLVM_android.so"],
        },
        darwin_x86_64: {
            srcs: ["darwin/lib64/libLLVM_android.dylib"],
        },
        // TODO(ccross): this is necessary because the prebuilt module must have
        // all the variants that are in the source module.  Ideally Soong's
        // arch mutator should handle this.
        windows: {
            enabled: true,
        }
    },
}

cc_prebuilt_library_shared {
    name: "libclang_android",
    host_supported: true,
    // TODO(ccross): this is necessary because the prebuilt module must have
    // all the variants that are in the source module.  Ideally Soong's
    // arch mutator should handle this.
    // TODO(b/153609531): remove when no longer needed.
    native_bridge_supported: true,
    target: {
        linux_glibc_x86_64: {
            srcs: ["linux/lib64/libclang_android.so"],
        },
        darwin_x86_64: {
            srcs: ["darwin/lib64/libclang_android.dylib"],
        },
        // TODO(ccross): this is necessary because the prebuilt module must have
        // all the variants that are in the source module.  Ideally Soong's
        // arch mutator should handle this.
        windows: {
            enabled: true,
        }
    },
}

java_import {
    name: "sdk-core-lambda-stubs",
    jars: ["core-lambda-stubs.jar"],
}

genrule {
    name: "build-tools-lld-linux",
    visibility: ["//development/build"],
    tools: ["soong_zip"],
    cmd: "mkdir -p $(genDir)/out/{lld-bin,lib64} && " +
        "cp $(location lld) $(genDir)/out/ && " +
        "cp $(location lld-dummy) $(genDir)/out/arm-linux-androideabi-ld && " +
        "cp $(location lld-dummy) $(genDir)/out/aarch64-linux-android-ld && " +
        "cp $(location lld-dummy) $(genDir)/out/i686-linux-android-ld && " +
        "cp $(location lld-dummy) $(genDir)/out/x86_64-linux-android-ld && " +
        "cp $(location lld-dummy) $(genDir)/out/mipsel-linux-android-ld && " +
        "cp $(location linux/lld-bin/lld) $(genDir)/out/lld-bin/ && " +
        "cp $(location linux/lib64/libc++.so.1) $(genDir)/out/lib64/ && " +
        "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out",
    srcs: [
        "lld",
        "lld-dummy",
        "linux/lld-bin/lld",
        "linux/lib64/libc++.so.1",
    ],
    out: ["lld.zip"],
}

genrule {
    name: "build-tools-lld-windows",
    visibility: ["//development/build"],
    tools: ["soong_zip"],
    cmd: "mkdir -p $(genDir)/out/{lld-bin,lib64} && " +
        "cp $(location lld-dummy) $(genDir)/out/arm-linux-androideabi-ld.exe && " +
        "cp $(location lld-dummy) $(genDir)/out/aarch64-linux-android-ld.exe && " +
        "cp $(location lld-dummy) $(genDir)/out/i686-linux-android-ld.exe && " +
        "cp $(location lld-dummy) $(genDir)/out/x86_64-linux-android-ld.exe && " +
        "cp $(location lld-dummy) $(genDir)/out/mipsel-linux-android-ld.exe && " +
        "cp $(location windows/lld-bin/lld.exe) $(genDir)/out/lld-bin/ && " +
        "cp $(location windows/lld-bin/libwinpthread-1.dll) $(genDir)/out/lld-bin/ && " +
        "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out",
    srcs: [
        "lld-dummy",
        "windows/lld-bin/lld.exe",
        "windows/lld-bin/libwinpthread-1.dll",
    ],
    out: ["lld.zip"],
}

genrule {
    name: "build-tools-lld-darwin",
    visibility: ["//development/build"],
    tools: ["soong_zip"],
    cmd: "mkdir -p $(genDir)/out/{lld-bin,lib64} && " +
        "cp $(location lld) $(genDir)/out/ && " +
        "cp $(location lld-dummy) $(genDir)/out/arm-linux-androideabi-ld && " +
        "cp $(location lld-dummy) $(genDir)/out/aarch64-linux-android-ld && " +
        "cp $(location lld-dummy) $(genDir)/out/i686-linux-android-ld && " +
        "cp $(location lld-dummy) $(genDir)/out/x86_64-linux-android-ld && " +
        "cp $(location lld-dummy) $(genDir)/out/mipsel-linux-android-ld && " +
        "cp $(location darwin/lld-bin/lld) $(genDir)/out/lld-bin/ && " +
        "cp $(location darwin/lib64/libc++.1.dylib) $(genDir)/out/lib64/ && " +
        "cp $(location darwin/lib64/libc++abi.1.dylib) $(genDir)/out/lib64/ && " +
        "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out",
    srcs: [
        "lld",
        "lld-dummy",
        "darwin/lld-bin/lld",
        "darwin/lib64/libc++.1.dylib",
        "darwin/lib64/libc++abi.1.dylib",
    ],
    out: ["lld.zip"],
}