cc_prebuilt_binary and symlinks

593 views
Skip to first unread message

Chris.R

unread,
Apr 26, 2020, 1:25:31 PM4/26/20
to Android Building
(Preface: I am running on a Qualcomm AOSP build tree for Android-Q, and not sure how different it is from an unmodified Android release.)

It doesn't look to me like symlinks work for cc_prebuilt_binary the way they work for cc_binary.

Android.bp for the source case:
cc_binary {
    name: "world",

    strip: {
        none: true,
    },

    srcs: [
        "world.c",
    ],

    symlinks: [
        "hello"
    ],
}

Android.bp for the prebuilt case:
cc_prebuilt_binary {
    name: "world_bin",

    strip: {
        none: true,
    },

    srcs: [
        "world_bin",
    ],

    symlinks: [
        "hello_bin",
    ],
}

The results when both of these are built:
-rwxrwxr-x 1 builder group  14784 Apr 25 14:28 world_bin*
lrwxrwxrwx 1 builder group      5 Apr 25 14:28 hello -> world*
-rwxrwxr-x 1 builder group  14784 Apr 25 14:28 world*


It even appears that such symlinks declarations that are in AOSP/system/core/logcat/Android.bp don't work:
cc_prebuilt_binary {
    name: "logpersist.start",
    srcs: ["logpersist"],
    init_rc: ["logcatd.rc"],
    required: ["logcatd"],
    symlinks: [
        "logpersist.stop",
        "logpersist.cat",
    ],
    strip: {
        none: true,
    },
}

Yields logpersist.start, but no links as logpersist.stop or logpersist.cat

Has the symlinks feature of cc_prebuilt_binary not been implemented yet?

Thanks in advance,

Chris
Reply all
Reply to author
Forward
0 new messages