Skip to content

Commit

Permalink
libcutils: Work around the lack of __mulodi4
Browse files Browse the repository at this point in the history
The parent change ran into an issue where enabling UBSan on an i686
build caused it to use __mulodi4.

android/ndk#184 documents linking against
libclang_rt.builtins-i686.a, but that's not available from soong either.

Bug: 62378620
Bug: 29412086
Test: x86 builds work again
Change-Id: I730d59558aa4ed28f8a11b5393e037111e320f29
  • Loading branch information
lhchavez committed Nov 4, 2017
1 parent 6883fab commit de6ee79
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -114,37 +114,55 @@ cc_library {
"trace-dev.c",
"uevent.cpp",
],
sanitize: {
misc_undefined: ["integer"],
},
},

android_arm: {
srcs: ["arch-arm/memset32.S"],
sanitize: {
misc_undefined: ["integer"],
},
},
android_arm64: {
srcs: ["arch-arm64/android_memset.S"],
sanitize: {
misc_undefined: ["integer"],
},
},

android_mips: {
srcs: ["arch-mips/android_memset.c"],
sanitize: {
misc_undefined: ["integer"],
},
},
android_mips64: {
srcs: ["arch-mips/android_memset.c"],
sanitize: {
misc_undefined: ["integer"],
},
},

android_x86: {
srcs: [
"arch-x86/android_memset16.S",
"arch-x86/android_memset32.S",
],
// TODO: This is to work around b/29412086.
// Remove once __mulodi4 is available and move the "sanitize" block
// to the android target.
sanitize: {
misc_undefined: [],
},
},

android_x86_64: {
srcs: [
"arch-x86_64/android_memset16.S",
"arch-x86_64/android_memset32.S",
],
sanitize: {
misc_undefined: ["integer"],
},
},
},

Expand Down

0 comments on commit de6ee79

Please sign in to comment.