Skip to content

Commit af1998d

Browse files
Ensure that ar uses the LLVMgold plugin when building for Android
Otherwise it sometimes generates static libraries that the linker cannot process.
1 parent 5b76b45 commit af1998d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

config/android-settings.gypi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
[
5252
'-fuse-ld=gold',
5353
],
54+
55+
'arflags':
56+
[
57+
'--plugin', '<!(echo $(dirname <(ar))/../lib/LLVMgold.so)',
58+
],
5459
},
5560
{
5661
'ldflags':

config/android.gypi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
'objcopy': '<!(echo ${OBJCOPY:-objcopy})',
2828
'objdump': '<!(echo ${OBJDUMP:-objdump})',
2929
'strip': '<!(echo ${STRIP:-strip})',
30+
'ar': '<!(echo ${AR:-ar})',
3031
},
3132

3233
'target_defaults':

0 commit comments

Comments
 (0)