Configurations/15-android.conf: detect NDK llvm-ar.
authorAndy Polyakov <appro@openssl.org>
Fri, 19 Oct 2018 20:24:30 +0000 (22:24 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 31 Oct 2018 14:45:03 +0000 (15:45 +0100)
This excluses user from additional PATH adjustments in case NDK has
llvm-ar.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7443)

(cherry picked from commit ddf2e8c8ccad49cff0d6a0a0b26ca892ec4ce33a)

Configurations/15-android.conf

index f9ad0833fafd70cf8405632f983405b74fb544ca..10342ed5e3750d37161515604c22933a957dd5ed 100644 (file)
                         .  "/$tritools-4.9/prebuilt/$host";
                 $user{CC} = "clang" if ($user{CC} !~ m|clang|);
                 $user{CROSS_COMPILE} = undef;
+                if (which("llvm-ar") =~ m|^$ndk/.*/prebuilt/([^/]+)/|) {
+                    $user{AR} = "llvm-ar";
+                    $user{ARFLAGS} = [ "rs" ];
+                    $user{RANLIB} = ":";
+                }
             } elsif (-f "$ndk/AndroidVersion.txt") {    #"standalone toolchain"
                 my $cc = $user{CC} // "clang";
                 # One can probably argue that both clang and gcc should be